Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312887 Details for
Bug 428232
DN Rename with case change only fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
cvs diffs
428232.diffs (text/plain), 3.74 KB, created by
Noriko Hosoi
on 2008-07-29 14:59:00 UTC
(
hide
)
Description:
cvs diffs
Filename:
MIME Type:
Creator:
Noriko Hosoi
Created:
2008-07-29 14:59:00 UTC
Size:
3.74 KB
patch
obsolete
>Index: slapi-plugin.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v >retrieving revision 1.26 >diff -t -w -U4 -r1.26 slapi-plugin.h >--- slapi-plugin.h 15 Jul 2008 16:49:42 -0000 1.26 >+++ slapi-plugin.h 29 Jul 2008 14:53:49 -0000 >@@ -317,8 +317,9 @@ > void slapi_sdn_get_backend_parent(const Slapi_DN *sdn,Slapi_DN *sdn_parent,const Slapi_Backend *backend); > Slapi_DN * slapi_sdn_dup(const Slapi_DN *sdn); > void slapi_sdn_copy(const Slapi_DN *from, Slapi_DN *to); > int slapi_sdn_compare( const Slapi_DN *sdn1, const Slapi_DN *sdn2 ); >+int slapi_sdn_rawcompare( const Slapi_DN *sdn1, const Slapi_DN *sdn2 ); > int slapi_sdn_isempty( const Slapi_DN *sdn); > int slapi_sdn_issuffix(const Slapi_DN *sdn, const Slapi_DN *suffixsdn); > int slapi_sdn_isparent( const Slapi_DN *parent, const Slapi_DN *child ); > int slapi_sdn_isgrandparent( const Slapi_DN *parent, const Slapi_DN *child ); >Index: dn.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dn.c,v >retrieving revision 1.10 >diff -t -w -U4 -r1.10 dn.c >--- dn.c 4 Oct 2007 16:27:47 -0000 1.10 >+++ dn.c 29 Jul 2008 14:53:49 -0000 >@@ -1383,8 +1383,40 @@ > } > return rc; > } > >+/* >+ * compare original DNs considering the case difference but the space >+ * difference. >+ */ >+int >+slapi_sdn_rawcompare( const Slapi_DN *sdn1, const Slapi_DN *sdn2 ) >+{ >+ int rc; >+ char *dn1 = slapi_ch_strdup(slapi_sdn_get_dn(sdn1)); >+ char *dn2 = slapi_ch_strdup(slapi_sdn_get_dn(sdn2)); >+ >+ slapi_dn_normalize(dn1); >+ slapi_dn_normalize(dn2); >+ >+ if(dn1 == NULL) >+ { >+ rc = -1; >+ } >+ else >+ { >+ if(dn2 == NULL) >+ { >+ rc = 1; >+ } >+ else >+ { >+ rc = strcmp(dn1, dn2); >+ } >+ } >+ return rc; >+} >+ > int > slapi_sdn_isempty( const Slapi_DN *sdn) > { > const char *dn= slapi_sdn_get_dn(sdn); >Index: back-ldbm/ldbm_modrdn.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v >retrieving revision 1.7 >diff -t -w -U4 -r1.7 ldbm_modrdn.c >--- back-ldbm/ldbm_modrdn.c 18 Oct 2007 22:40:18 -0000 1.7 >+++ back-ldbm/ldbm_modrdn.c 29 Jul 2008 14:53:49 -0000 >@@ -267,9 +267,12 @@ > /* Check that an entry with the same DN doesn't already exist. */ > { > Slapi_Entry *entry; > slapi_pblock_get( pb, SLAPI_MODRDN_EXISTING_ENTRY, &entry); >- if(entry!=NULL) >+ if((entry != NULL) && >+ /* allow modrdn even if the cases do not match */ >+ (0 == slapi_sdn_rawcompare((const Slapi_DN *)&dn_newdn, >+ (const Slapi_DN *)&dn_olddn))) > { > ldap_result_code= LDAP_ALREADY_EXISTS; > goto error_return; > } >@@ -416,9 +419,13 @@ > > slapi_entry_set_sdn( ec->ep_entry, &dn_newdn ); > > /* create it in the cache - prevents others from creating it */ >- if ( cache_add_tentative( &inst->inst_cache, ec, NULL ) != 0 ) { >+ if (( cache_add_tentative( &inst->inst_cache, ec, NULL ) != 0 ) && >+ /* allow modrdn even if the cases do not match */ >+ ( 0 == slapi_sdn_rawcompare((const Slapi_DN *)&dn_newdn, >+ (const Slapi_DN *)&dn_olddn)) ) >+ { > /* somebody must've created it between dn2entry() and here */ > /* JCMREPL - Hmm... we can't permit this to happen...? */ > ldap_result_code= LDAP_ALREADY_EXISTS; > goto error_return;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 428232
:
312887
|
312890
|
312925
|
312926
|
312931
|
312932