The Samba-Bugzilla – Attachment 4714 Details for
Bug 6702
Why do we need LDAP displayName attribute writable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated smbldap.c patch
jht-smbldap.patch (text/plain), 2.41 KB, created by
John H Terpstra (mail address dead(
on 2009-09-17 11:21:11 UTC
(
hide
)
Description:
Updated smbldap.c patch
Filename:
MIME Type:
Creator:
John H Terpstra (mail address dead(
Created:
2009-09-17 11:21:11 UTC
Size:
2.41 KB
patch
obsolete
>diff -up source3/lib/smbldap.c.orig source3/lib/smbldap.c >--- source3/lib/smbldap.c.orig 2009-09-09 07:40:43.000000000 -0500 >+++ source3/lib/smbldap.c 2009-09-17 02:29:34.000000000 -0500 >@@ -439,6 +439,8 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { > LDAPMod **mods; > int i; > int j; >+ bool disset= False; >+ bool disname = False; > > mods = *modlist; > >@@ -454,6 +456,21 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { > return; > #endif > >+ if ( !(StrnCaseCmp( attribute , "displayname", strlen("displayname")))) { >+ disname = true; >+ DEBUG(10,("Attribute displayName passed to smbldap_set_mod()\n")); >+ } >+ if ( !(lp_parm_bool(-1, "ldapsam", "displayNameCanWrite", true))) { >+ disset = true; >+ DEBUG(10,("Attribute ldapsam:displayNameCanWrite = false\n")); >+ } >+ if ( disname && disset ) { >+ /* attribute is 'displayname' and ldapsam:displayNameCanWrite = false so bail out. */ >+ DEBUG(10,("smbldap_set_mod(): ldapsam:displayNameCanWrite is false, and display name update requested\n")); >+ DEBUG(10, ("Attribute displayName delete therefore ignored.\n")); >+ return; >+ } >+ > if (mods == NULL) { > mods = SMB_MALLOC_P(LDAPMod *); > if (mods == NULL) { >@@ -523,6 +540,8 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { > { > char oldval[2048]; /* current largest allowed value is mungeddial */ > bool existed; >+ bool disset= False; >+ bool disname = False; > > if (attribute == NULL) { > /* This can actually happen for ldapsam_compat where we for >@@ -530,6 +549,21 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { > return; > } > >+ if ( !(StrnCaseCmp( attribute , "displayname", strlen("displayname")))) { >+ disname = true; >+ DEBUG(10,("Attribute displayName passed to smbldap_make_mod()\n")); >+ } >+ if ( !(lp_parm_bool(-1, "ldapsam", "displayNameCanWrite", true))) { >+ disset = true; >+ DEBUG(10,("Attribute ldapsam:displayNameCanWrite = false\n")); >+ } >+ if ( disname && disset ) { >+ /* attribute is 'displayname' and ldapsam:displayNameCanWrite = false so bail out. */ >+ DEBUG(10,("smbldap_make_mod(): ldapsam:displayNameCanWrite is false, and display name update requested\n")); >+ DEBUG(10, ("Attribute displayName change therefore ignored.\n")); >+ return; >+ } >+ > if (existing != NULL) { > existed = smbldap_get_single_attribute(ldap_struct, existing, attribute, oldval, sizeof(oldval)); > } else {
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 Raw
Actions:
View
Attachments on
bug 6702
:
4671
|
4682
|
4693
| 4714