Fix lookup_sids to detect unix_groups and unix_users domain sids.
authorMichael Adam <obnox@samba.org>
Fri, 25 Jan 2008 00:40:42 +0000 (01:40 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 25 Jan 2008 00:42:22 +0000 (01:42 +0100)
This fixes panics in wbcLookupRids when 1-2-22 was passed as a
domain sid.

Michael
(This used to be commit c0d9732cf4482b0db02c75f316ff2b41f3336425)

source3/passdb/lookup_sid.c

index c954c776b6a55ddb94ff572d0cbdd68bcfbc29e1..9f66eb934e46622337a1c1259bd9b5eedef5608f 100644 (file)
@@ -599,6 +599,16 @@ static bool lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
                return true;
        }
 
+       if (sid_check_is_unix_users(sid)) {
+               *name = talloc_strdup(mem_ctx, unix_users_domain_name());
+               return true;
+       }
+
+       if (sid_check_is_unix_groups(sid)) {
+               *name = talloc_strdup(mem_ctx, unix_groups_domain_name());
+               return true;
+       }
+
        if (sid->num_auths != 4) {
                /* This can't be a domain */
                return false;