|
@@ -561,7 +561,7 @@ preop_modrdn(Slapi_PBlock *pb)
|
|
|
char **argv;
|
|
char **argv;
|
|
|
char **attrName;
|
|
char **attrName;
|
|
|
Slapi_DN *target_sdn = NULL;
|
|
Slapi_DN *target_sdn = NULL;
|
|
|
- Slapi_DN *superior;
|
|
|
|
|
|
|
+ Slapi_DN *superior = NULL;
|
|
|
char *rdn;
|
|
char *rdn;
|
|
|
Slapi_Attr *attr;
|
|
Slapi_Attr *attr;
|
|
|
char **firstSubtree;
|
|
char **firstSubtree;
|
|
@@ -601,7 +601,7 @@ preop_modrdn(Slapi_PBlock *pb)
|
|
|
* its current level in the tree. Use the target DN for
|
|
* its current level in the tree. Use the target DN for
|
|
|
* determining which managed tree this belongs to
|
|
* 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 */
|
|
/* Get the new RDN - this has the attribute values */
|
|
|
err = slapi_pblock_get(pb, SLAPI_MODRDN_NEWRDN, &rdn);
|
|
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.
|
|
* after "," are subtreeDN's.
|
|
|
*/
|
|
*/
|
|
|
for ( firstSubtree = argv; strcmp(*firstSubtree, ",") != 0;
|
|
for ( firstSubtree = argv; strcmp(*firstSubtree, ",") != 0;
|
|
@@ -650,7 +650,7 @@ preop_modrdn(Slapi_PBlock *pb)
|
|
|
for (attrName = argv; strcmp(*attrName, ",") != 0; attrName++ )
|
|
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
|
|
* unhashed#user#password because unhashed#user#password does not exist
|
|
|
* in this case.
|
|
* in this case.
|
|
|
*/
|
|
*/
|