diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-01-22 09:47:52 -0800 |
---|---|---|
committer | Noriko Hosoi <nhosoi@jiji.localdomain> | 2010-01-22 10:36:16 -0800 |
commit | b5e653a844af60596f9bc6b16349ee902ddb51f5 (patch) | |
tree | d22f47113e303de236e9a9b01376cb6e3d14486f /ldap/servers/slapd/back-ldbm/ldbm_attr.c | |
parent | 4d93699a71acb061c5787d2b8b61a0417ce02808 (diff) | |
download | ds-b5e653a844af60596f9bc6b16349ee902ddb51f5.tar.gz ds-b5e653a844af60596f9bc6b16349ee902ddb51f5.tar.xz ds-b5e653a844af60596f9bc6b16349ee902ddb51f5.zip |
Allow modrdn to move subtree and rename non-leaf node
This patch includes
- replacing the entrydn index with the entryrdn index
- replacing a full DN in each entry in the DB with an RDN
- extending Slapi_Entry, entry2str, and str2entry to absorb the changes
made on the entry
- adding DN/RDN helper functions
- adding DN cache
- adding a utility and a migration script to convert the DN format database
to the RDN format
- extending a database dump utility dbscan to support the entryrdn
- slapi_dn_syntax_check by nkinder@redhat.com is added to check the dn before
modify operations
- big fix for 171338 - Enhancement: winsync modrdn not synced
In addition to the above, compile warnings and memory leaks found in testing
the new feature are fixed.
For more details, see the feature design document at:
http://directory.fedoraproject.org/wiki/Subtree_Rename
and bugzilla at:
https://bugzilla.redhat.com/show_bug.cgi?id=171338
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/ldbm_attr.c')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_attr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attr.c b/ldap/servers/slapd/back-ldbm/ldbm_attr.c index eccf8543..1042cf7e 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_attr.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_attr.c @@ -60,6 +60,7 @@ attrinfo_delete(struct attrinfo **pp) (*pp)->ai_key_cmp_fn = NULL; slapi_ch_free((void**)&((*pp)->ai_type)); slapi_ch_free((void**)(*pp)->ai_index_rules); + slapi_ch_free((void**)&((*pp)->ai_attrcrypt)); slapi_ch_free((void**)pp); *pp= NULL; } @@ -210,6 +211,10 @@ attr_index_config( a->ai_indexmask |= INDEX_EQUALITY; } else if ( strncasecmp( indexes[j], "approx", 6 ) == 0 ) { a->ai_indexmask |= INDEX_APPROX; + } else if ( strncasecmp( indexes[j], "subtree", 7 ) == 0 ) { + /* subtree should be located before "sub" */ + a->ai_indexmask |= INDEX_SUBTREE; + a->ai_dup_cmp_fn = entryrdn_compare_dups; } else if ( strncasecmp( indexes[j], "sub", 3 ) == 0 ) { a->ai_indexmask |= INDEX_SUB; } else if ( strncasecmp( indexes[j], "none", 4 ) == 0 ) { @@ -500,7 +505,7 @@ static void find_our_friends(char *s, int *has, int *num) { *has = (0 == strcasecmp(s,"hassubordinates")); if (!(*has)) { - *num = (0 == strcasecmp(s,"numsubordinates")); + *num = (0 == strcasecmp(s,LDBM_NUMSUBORDINATES_STR)); } } |