From be0f3f159f6c210cc3f9c6054dc7e1d079f2c611 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 26 Aug 2005 18:57:32 +0000 Subject: r9660: real fix for group enumeration bug in 3.0.20; only affected the ldapsam code (This used to be commit 62f9fb5e3a9bce539c9fedc5fdec1b8741a922c7) --- source3/passdb/pdb_ldap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/passdb/pdb_ldap.c') 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); -- cgit