s3-winbind: Fix paranoia checks in winbindd_samr.c.
authorAndreas Schneider <asn@samba.org>
Fri, 20 May 2011 13:42:46 +0000 (15:42 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 15 Jun 2011 07:56:01 +0000 (09:56 +0200)
This fixes looking up the correct unix user instead of allocation a new
uid and creating it.

Fix bug #8215 (winbind unix username lookup doesn't work correctly).
(cherry picked from commit 531edfdd1924bfb2ef486820f7f5787098bd953a)

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jun 15 09:56:01 CEST 2011 on sn-devel-104

source3/winbindd/winbindd_samr.c

index 3b9377f7299f82614817952ad01a37bb1ae95fc2..48ce92d5e706bb14d10ebf537e07f065f56dcf93 100644 (file)
@@ -762,8 +762,8 @@ static NTSTATUS sam_rids_to_names(struct winbindd_domain *domain,
        ZERO_STRUCT(lsa_policy);
 
        /* Paranoia check */
-       if (!sid_check_is_builtin(domain_sid) &&
-           !sid_check_is_domain(domain_sid) &&
+       if (!sid_check_is_in_builtin(domain_sid) &&
+           !sid_check_is_in_our_domain(domain_sid) &&
            !sid_check_is_unix_users(domain_sid) &&
            !sid_check_is_unix_groups(domain_sid) &&
            !sid_check_is_in_wellknown_domain(domain_sid)) {