Fix winbindd on a PDC by reverting : 83b04c60fac76ccd2d5aecb14f8896a07d488b1f..6e6651...
authorJeremy Allison <jra@samba.org>
Thu, 29 May 2008 17:38:59 +0000 (10:38 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 29 May 2008 17:38:59 +0000 (10:38 -0700)
We still need to address https://bugzilla.redhat.com/show_bug.cgi?id=429024, but this
will come later.
Jeremy.

source/nsswitch/winbindd_dual.c
source/nsswitch/winbindd_util.c

index 1d4d312eeef418d596188b0091df8a69c4a05e52..7176a25d62afe36a8d1aa2948457e0908178eae7 100644 (file)
@@ -35,7 +35,6 @@
 #define DBGC_CLASS DBGC_WINBIND
 
 extern BOOL override_logfile;
-extern struct winbindd_methods cache_methods;
 
 /* Read some data from a client connection */
 
@@ -993,15 +992,6 @@ static BOOL fork_domain_child(struct winbindd_child *child)
                        child);
        }
 
-       /* Special case for Winbindd on a Samba DC,
-        * We want to make sure the child can connect to smbd
-        * but not the main daemon */
-
-       if (child->domain && child->domain->internal && IS_DC) {
-               child->domain->methods = &cache_methods;
-               child->domain->online = False;
-       }
-
        while (1) {
 
                int ret;
index ecd919d6ffc96cd78faf2fa05a8162dd2765383c..d2daf7830dba66ff7c4b98c719cfa12f38a2e9f6 100644 (file)
@@ -83,6 +83,9 @@ static BOOL is_internal_domain(const DOM_SID *sid)
        if (sid == NULL)
                return False;
 
+       if ( IS_DC )
+               return sid_check_is_builtin(sid);
+
        return (sid_check_is_domain(sid) || sid_check_is_builtin(sid));
 }
 
@@ -91,6 +94,9 @@ static BOOL is_in_internal_domain(const DOM_SID *sid)
        if (sid == NULL)
                return False;
 
+       if ( IS_DC )
+               return sid_check_is_in_builtin(sid);
+
        return (sid_check_is_in_our_domain(sid) || sid_check_is_in_builtin(sid));
 }