svn commit: samba r7174 - in trunk/source/nsswitch: .

jerry at samba.org jerry at samba.org
Wed Jun 1 20:18:52 GMT 2005


Author: jerry
Date: 2005-06-01 20:18:52 +0000 (Wed, 01 Jun 2005)
New Revision: 7174

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7174

Log:
check in volker's log file per domain patch to the new winbindd
Modified:
   trunk/source/nsswitch/winbindd_dual.c
   trunk/source/nsswitch/winbindd_sid.c
   trunk/source/nsswitch/winbindd_util.c


Changeset:
Modified: trunk/source/nsswitch/winbindd_dual.c
===================================================================
--- trunk/source/nsswitch/winbindd_dual.c	2005-06-01 20:18:37 UTC (rev 7173)
+++ trunk/source/nsswitch/winbindd_dual.c	2005-06-01 20:18:52 UTC (rev 7174)
@@ -494,11 +494,26 @@
 }
 
 BOOL setup_domain_child(struct winbindd_domain *domain,
-			struct winbindd_child *child)
+			struct winbindd_child *child,
+			const char *explicit_logfile)
 {
 	int fdpair[2];
 	struct winbindd_cli_state state;
 
+	extern BOOL override_logfile;
+	pstring logfilename;
+
+	if (explicit_logfile != NULL) {
+		pstr_sprintf(logfilename, "%s/log.winbindd-%s",
+			     dyn_LOGFILEBASE, explicit_logfile);
+	} else if (domain != NULL) {
+		pstr_sprintf(logfilename, "%s/log.wb-%s",
+			     dyn_LOGFILEBASE, domain->name);
+	} else {
+		smb_panic("Internal error: domain == NULL && "
+			  "explicit_logfile == NULL");
+	}
+
 	if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fdpair) != 0) {
 		DEBUG(0, ("Could not open child pipe: %s\n",
 			  strerror(errno)));
@@ -537,6 +552,11 @@
 	}
 
 	close_conns_after_fork();
+
+	if (!override_logfile) {
+		lp_set_logfile(logfilename);
+		reopen_logs();
+	}
 	
 	dual_daemon_pipe = -1;
 	opt_dual_daemon = False;

Modified: trunk/source/nsswitch/winbindd_sid.c
===================================================================
--- trunk/source/nsswitch/winbindd_sid.c	2005-06-01 20:18:37 UTC (rev 7173)
+++ trunk/source/nsswitch/winbindd_sid.c	2005-06-01 20:18:52 UTC (rev 7174)
@@ -133,7 +133,7 @@
 
 BOOL init_idmap_child(void)
 {
-	return setup_domain_child(NULL, &static_idmap_child);
+	return setup_domain_child(NULL, &static_idmap_child, "idmap");
 }
 
 struct winbindd_child *idmap_child(void)

Modified: trunk/source/nsswitch/winbindd_util.c
===================================================================
--- trunk/source/nsswitch/winbindd_util.c	2005-06-01 20:18:37 UTC (rev 7173)
+++ trunk/source/nsswitch/winbindd_util.c	2005-06-01 20:18:52 UTC (rev 7174)
@@ -260,7 +260,7 @@
 			break;
 		}
 
-		if (find_domain_from_sid_noinit(&sid) == NULL) {
+		if (find_domain_from_name_noinit(p) == NULL) {
 			struct winbindd_domain *domain;
 			char *alternate_name = NULL;
 			
@@ -272,7 +272,7 @@
 			domain = add_trusted_domain(p, alternate_name,
 						    &cache_methods,
 						    &sid);
-			setup_domain_child(domain, &domain->child);
+			setup_domain_child(domain, &domain->child, NULL);
 		}
 		p=q;
 		if (p != NULL)
@@ -519,19 +519,19 @@
 	}
 
 	domain->primary = True;
-	setup_domain_child(domain, &domain->child);
+	setup_domain_child(domain, &domain->child, NULL);
 
 	/* Add our local SAM domains */
 
 	domain = add_trusted_domain("BUILTIN", NULL, &passdb_methods,
 				    &global_sid_Builtin);
-	setup_domain_child(domain, &domain->child);
+	setup_domain_child(domain, &domain->child, NULL);
 
 	if (!IS_DC) {
 		domain = add_trusted_domain(get_global_sam_name(), NULL,
 					    &passdb_methods,
 					    get_global_sam_sid());
-		setup_domain_child(domain, &domain->child);
+		setup_domain_child(domain, &domain->child, NULL);
 	}
 }
 



More information about the samba-cvs mailing list