[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-28-116-g6e66512

Simo Sorce idra at samba.org
Fri Feb 1 18:58:11 GMT 2008


The branch, v3-0-test has been updated
       via  6e66512d5beb256a44c6703cdb8c7fa7e0fd8537 (commit)
      from  83b04c60fac76ccd2d5aecb14f8896a07d488b1f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit 6e66512d5beb256a44c6703cdb8c7fa7e0fd8537
Author: Simo Sorce <idra at samba.org>
Date:   Fri Feb 1 13:50:04 2008 -0500

    Fix winbindd running on a Samba DC,
    This patch make sure we do not try to contact smbd in the main dameon
    to avoid deadlocks.
    All the operations that require connecting to smbd are performed in
    the domain child anyway.

-----------------------------------------------------------------------

Summary of changes:
 source/nsswitch/winbindd_dual.c |   11 +++++++++++
 source/nsswitch/winbindd_util.c |    6 ------
 2 files changed, 11 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c
index ffbedfa..fa6add3 100644
--- a/source/nsswitch/winbindd_dual.c
+++ b/source/nsswitch/winbindd_dual.c
@@ -35,6 +35,7 @@
 #define DBGC_CLASS DBGC_WINBIND
 
 extern BOOL override_logfile;
+extern struct winbindd_methods cache_methods;
 
 /* Read some data from a client connection */
 
@@ -988,6 +989,16 @@ 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->internal = False;
+		child->domain->methods = &cache_methods;
+		child->domain->online = False;
+	}
+
 	while (1) {
 
 		int ret;
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index d2daf78..ecd919d 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/nsswitch/winbindd_util.c
@@ -83,9 +83,6 @@ 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));
 }
 
@@ -94,9 +91,6 @@ 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));
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list