浏览代码

Ticket 47641 - 7-bit check plugin not checking MODRDN operation

Bug Description:  7-bit check is not being performed on modrdn operations.

Fix Description:  The "superior" DN was not properly being checked/set, and
                  caused the 7-bit check to be skipped.

https://fedorahosted.org/389/ticket/47641

Reviewed by: nhosoi(Thanks!)
Mark Reynolds 12 年之前
父节点
当前提交
ddbec8c4ce
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      ldap/servers/plugins/uiduniq/7bit.c

+ 4 - 4
ldap/servers/plugins/uiduniq/7bit.c

@@ -561,7 +561,7 @@ preop_modrdn(Slapi_PBlock *pb)
     char **argv;
     char **attrName;
     Slapi_DN *target_sdn = NULL;
-    Slapi_DN *superior;
+    Slapi_DN *superior = NULL;
     char *rdn; 
     Slapi_Attr *attr;
     char **firstSubtree;
@@ -601,7 +601,7 @@ preop_modrdn(Slapi_PBlock *pb)
      * its current level in the tree.  Use the target DN for
      * determining which managed tree this belongs to
      */
-    if (!superior) superior = target_sdn;
+    if (!slapi_sdn_get_dn(superior)) superior = target_sdn;
 
     /* Get the new RDN - this has the attribute values */
     err = slapi_pblock_get(pb, SLAPI_MODRDN_NEWRDN, &rdn);
@@ -635,7 +635,7 @@ preop_modrdn(Slapi_PBlock *pb)
     }
 
     /*
-     * arguments before "," are the 7-bit clean attribute names.  Arguemnts
+     * arguments before "," are the 7-bit clean attribute names.  Arguments
      * after "," are subtreeDN's.
      */
     for ( firstSubtree = argv; strcmp(*firstSubtree, ",") != 0;
@@ -650,7 +650,7 @@ preop_modrdn(Slapi_PBlock *pb)
     for (attrName = argv; strcmp(*attrName, ",") != 0; attrName++ )
     {
       /* 
-       * If the attribut type is userpassword, do not replace it by 
+       * If the attribute type is userpassword, do not replace it by
        * unhashed#user#password because unhashed#user#password does not exist  
        * in this case.
        */