]> git.samba.org - samba.git/commitdiff
winbindd: explicit check for well-known SIDs in wb_lookupsids_bulk()
authorRalph Boehme <slow@samba.org>
Sun, 2 Apr 2017 11:42:45 +0000 (13:42 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 6 Apr 2017 18:08:19 +0000 (20:08 +0200)
Those are implicitly already catched by the

  if (sid->num_auths != 5)

check, but I'd like to make the desired behaviour more obvious.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12727

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/wb_lookupsids.c

index 3f48ad748b32dbb4628f6e900d6ee0df6f4fbb8f..858616be182f38e4ae7880ecb6d4628b30a7297f 100644 (file)
@@ -296,7 +296,10 @@ static bool wb_lookupsids_bulk(const struct dom_sid *sid)
            sid_check_is_in_unix_users(sid) ||
            sid_check_is_unix_users(sid) ||
            sid_check_is_in_builtin(sid) ||
-           sid_check_is_builtin(sid)) {
+           sid_check_is_builtin(sid) ||
+           sid_check_is_wellknown_domain(sid, NULL) ||
+           sid_check_is_in_wellknown_domain(sid))
+       {
                /*
                 * These are locally done piece by piece anyway, no
                 * need for bulk optimizations.