s3: Fix bug 8567 -- segfault in dom_sid_compare
authorVolker Lendecke <vl@samba.org>
Sun, 19 Feb 2012 11:49:55 +0000 (12:49 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 21 Feb 2012 19:49:12 +0000 (20:49 +0100)
The underlying problem was that with ldapsam:trusted we require the
a group mapping for the primary group of every user, including root.

source3/passdb/pdb_ldap.c

index 7ce5edcefa9d91dc7e9c1a1c7a2b96c674fee65b..9316f4078a2c7d26ae01786bfd7d38489666916b 100644 (file)
@@ -3037,6 +3037,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
        if (dom_sid_compare(&global_sid_NULL, &(*pp_sids)[0]) == 0) {
                DEBUG(3, ("primary group of [%s] not found\n",
                          pdb_get_username(user)));
+               ret = NT_STATUS_INTERNAL_DB_CORRUPTION;
                goto done;
        }