svn commit: samba-web r783 - in trunk/patches: .
jerry at samba.org
jerry at samba.org
Fri Aug 26 19:21:59 GMT 2005
Author: jerry
Date: 2005-08-26 19:21:59 +0000 (Fri, 26 Aug 2005)
New Revision: 783
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=783
Log:
new v3 group enum patch
Modified:
trunk/patches/groupname_enumeration_v3.patch
Changeset:
Modified: trunk/patches/groupname_enumeration_v3.patch
===================================================================
--- trunk/patches/groupname_enumeration_v3.patch 2005-08-26 18:57:42 UTC (rev 782)
+++ trunk/patches/groupname_enumeration_v3.patch 2005-08-26 19:21:59 UTC (rev 783)
@@ -1,32 +1,42 @@
-Index: passdb/pdb_ldap.c
-===================================================================
---- passdb/pdb_ldap.c (revision 9659)
-+++ passdb/pdb_ldap.c (working copy)
-@@ -3692,22 +3692,23 @@
+diff -urN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/passdb/pdb_ldap.c samba-3.0.20-new/source/passdb/pdb_ldap.c
+--- samba-3.0.20-orig/source/passdb/pdb_ldap.c 2005-07-28 08:19:48.000000000 -0500
++++ samba-3.0.20-new/source/passdb/pdb_ldap.c 2005-08-26 14:16:00.000000000 -0500
+@@ -3692,23 +3692,24 @@
return False;
}
-+ /* verify that the 'cn' attribute exists */
-+
- vals = ldap_get_values(ld, entry, "cn");
- if ((vals == NULL) || (vals[0] == NULL)) {
- DEBUG(5, ("\"cn\" not found\n"));
- return False;
- }
+- vals = ldap_get_values(ld, entry, "cn");
+- if ((vals == NULL) || (vals[0] == NULL)) {
+- DEBUG(5, ("\"cn\" not found\n"));
+- return False;
+- }
- pull_utf8_talloc(mem_ctx,
- CONST_DISCARD(char **, &result->account_name),
- vals[0]);
- ldap_value_free(vals);
+- ldap_value_free(vals);
++ /* display name is the NT group name */
-+ /* display name is the NT group name */
-+
vals = ldap_get_values(ld, entry, "displayName");
- if ((vals == NULL) || (vals[0] == NULL))
+- if ((vals == NULL) || (vals[0] == NULL))
++ if ((vals == NULL) || (vals[0] == NULL)) {
DEBUG(8, ("\"displayName\" not found\n"));
- else
- pull_utf8_talloc(mem_ctx,
+- else
+- pull_utf8_talloc(mem_ctx,
- CONST_DISCARD(char **, &result->fullname),
-+ CONST_DISCARD(char **, &result->account_name),
- vals[0]);
+- vals[0]);
++
++ /* fallback to the 'cn' attribute */
++ vals = ldap_get_values(ld, entry, "cn");
++ if ((vals == NULL) || (vals[0] == NULL)) {
++ DEBUG(5, ("\"cn\" not found\n"));
++ return False;
++ }
++ pull_utf8_talloc(mem_ctx, CONST_DISCARD(char **, &result->account_name), vals[0]);
++ }
++ else {
++ pull_utf8_talloc(mem_ctx, CONST_DISCARD(char **, &result->account_name), vals[0]);
++ }
++
ldap_value_free(vals);
+ vals = ldap_get_values(ld, entry, "description");
More information about the samba-cvs
mailing list