summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-08-26 18:57:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:24 -0500
commitbe0f3f159f6c210cc3f9c6054dc7e1d079f2c611 (patch)
tree274053b5dc500a4c992b4fbe9a5446b8089fc480 /source3
parent99376ade3540babc51ce2f36b3a2753452b8cb59 (diff)
downloadsamba-be0f3f159f6c210cc3f9c6054dc7e1d079f2c611.tar.gz
samba-be0f3f159f6c210cc3f9c6054dc7e1d079f2c611.tar.bz2
samba-be0f3f159f6c210cc3f9c6054dc7e1d079f2c611.zip
r9660: real fix for group enumeration bug in 3.0.20; only affected the ldapsam code
(This used to be commit 62f9fb5e3a9bce539c9fedc5fdec1b8741a922c7)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_ldap.c9
-rw-r--r--source3/rpc_parse/parse_samr.c2
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index ee7a1f5b4c..17ff053783 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -3692,22 +3692,23 @@ static BOOL ldapgroup2displayentry(struct ldap_search_state *state,
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;
}
- pull_utf8_talloc(mem_ctx,
- CONST_DISCARD(char **, &result->account_name),
- vals[0]);
ldap_value_free(vals);
+ /* display name is the NT group name */
+
vals = ldap_get_values(ld, entry, "displayName");
if ((vals == NULL) || (vals[0] == NULL))
DEBUG(8, ("\"displayName\" not found\n"));
else
pull_utf8_talloc(mem_ctx,
- CONST_DISCARD(char **, &result->fullname),
+ CONST_DISCARD(char **, &result->account_name),
vals[0]);
ldap_value_free(vals);
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 45a1f0e23c..6b0193c6e4 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -1720,7 +1720,7 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 **sam,
DEBUG(11, ("init_sam_dispinfo_3: entry: %d\n",i));
init_unistr2(&(*sam)->str[i].uni_grp_name,
- entries[i].fullname, UNI_FLAGS_NONE);
+ entries[i].account_name, UNI_FLAGS_NONE);
init_unistr2(&(*sam)->str[i].uni_grp_desc,
entries[i].description, UNI_FLAGS_NONE);
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 05aa6fe484..1f79ce5c14 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -670,7 +670,7 @@ static void make_group_sam_entry_list(TALLOC_CTX *ctx, SAM_ENTRY **sam_pp,
/*
* JRA. I think this should include the null. TNG does not.
*/
- init_unistr2(&uni_name[i], entries[i].fullname,
+ init_unistr2(&uni_name[i], entries[i].account_name,
UNI_STR_TERMINATE);
init_sam_entry(&sam[i], &uni_name[i], entries[i].rid);
}