[SSSD] [PATCH] sysdb: make canonicalUserPrincipalName case-insensitive

Jakub Hrozek jhrozek at redhat.com
Fri Jun 20 11:24:48 UTC 2014


On Wed, Jun 18, 2014 at 04:44:31PM +0200, Sumit Bose wrote:
> On Tue, Jun 17, 2014 at 05:35:28PM +0200, Jakub Hrozek wrote:
> > On Tue, Jun 17, 2014 at 12:32:39PM +0200, Sumit Bose wrote:
> > > Hi,
> > > 
> > > I would like to ask to add the patch to master and the planned 1.12.0
> > > release. It is related to https://fedorahosted.org/sssd/ticket/1835
> > > which is planned for 1.12.1. But since it upgrades the sysdb version I
> > > think it is better suited for a .0 release.
> > > 
> > > bye,
> > > Sumit
> > 
> > Can you also add a unit test to the sysdb suite?
> 
> I already have tests for this in a different patch in my tree. Would you
> accept this patch as well (even if it adds an otherwise useless call to
> the sysdb interface) or shall I split out the case related tests and use
> the current sysdb calls?

Sure, I think it makes sense to review and apply them together, even if
unused, the function is tested, so we know it works.

I will only squash in two small changes, I don't think it's needed to
re-send the patches for them. In the first patch, I'll fix a comment:

diff --git a/src/db/sysdb_upgrade.c b/src/db/sysdb_upgrade.c
index dadb745..558b4f5 100644
--- a/src/db/sysdb_upgrade.c
+++ b/src/db/sysdb_upgrade.c
@@ -1560,7 +1560,7 @@ int sysdb_upgrade_15(struct sysdb_ctx *sysdb, const char **ver)
         goto done;
     }
 
-    /* Case insensitive search for originalDN */
+    /* Case insensitive search for canonicalUserPrincipalName */
     ret = ldb_msg_add_empty(msg, SYSDB_CANONICAL_UPN, LDB_FLAG_MOD_ADD, NULL);
     if (ret != LDB_SUCCESS) {
         ret = ENOMEM;

And in the second one I will remove an unused variable from the test:

diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 9103cd1..ac78f36 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -5277,7 +5277,6 @@ END_TEST
 START_TEST(test_upn_basic_case)
 {
     struct sysdb_test_ctx *test_ctx;
-    struct sysdb_attrs *attrs;
     int ret;
     struct ldb_message *msg;
     const char *str;

Otherwise ACK, the upgrade went fine in my testing.



More information about the sssd-devel mailing list