From: Günther Deschner Date: Wed, 19 Jan 2005 17:42:33 +0000 (+0000) Subject: r4851: Preleminary fix for ldapsam_enum_group_memberships when X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5392 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=853a8b7f1c0b00b2e4433d1281f3c9bfcaf980a6;p=thirdparty%2Fsamba.git r4851: Preleminary fix for ldapsam_enum_group_memberships when ldapsam:trusted=True. Don't bail out when ldap-search returns pure posixgroups (w.o. samba group-mapping). This way those unix-memberships do not appear in user and nt user token. Volker, could you please look over that one? Guenther --- diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c index 2cc1798d3fd..0c6e59b2fcd 100644 --- a/source/passdb/pdb_ldap.c +++ b/source/passdb/pdb_ldap.c @@ -2225,7 +2225,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods, if (!smbldap_get_single_attribute(conn->ldap_struct, entry, "sambaSID", str, sizeof(str)-1)) - goto done; + continue; if (!string_to_sid(&sid, str)) goto done; @@ -2233,7 +2233,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods, if (!smbldap_get_single_attribute(conn->ldap_struct, entry, "gidNumber", str, sizeof(str)-1)) - goto done; + continue; gid = strtoul(str, &end, 10); @@ -2249,7 +2249,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods, } if (sid_compare(&global_sid_NULL, &(*sids)[0]) == 0) { - DEBUG(3, ("primary group not found\n")); + DEBUG(3, ("primary group of [%s] not found\n", username)); goto done; }