svn commit: samba r22292 - in branches/SAMBA_4_0/source/script/tests: .

abartlet at samba.org abartlet at samba.org
Tue Apr 17 03:47:51 GMT 2007


Author: abartlet
Date: 2007-04-17 03:47:51 +0000 (Tue, 17 Apr 2007)
New Revision: 22292

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

Log:
Start the LDAP server inside the same fifo as smbd, as OpenLDAP (like
smbd, but not Fedora DS yet) will then shut down when it looses stdin.

This avoids leaving stray slapd processes around, if we don't finish
the script to run the kill.

Also set KRB5_CONFIG in the smbd process again, as we do actually need
this...

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/script/tests/Samba4.pm


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===================================================================
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm	2007-04-17 02:14:28 UTC (rev 22291)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm	2007-04-17 03:47:51 UTC (rev 22292)
@@ -67,32 +67,35 @@
 	my ($self, $env_vars, $max_time) = @_;
 	return 0 if ( -p $env_vars->{SMBD_TEST_FIFO});
 
-	# Start slapd before smbd
-	if (defined($self->{ldap})) {
-		$self->slapd_start($env_vars) or 
-			die("couldn't start slapd");
-
-		print "LDAP PROVISIONING...";
-		$self->provision_ldap($env_vars);
-	}
-
-	SocketWrapper::set_default_iface(1);
-
 	unlink($env_vars->{SMBD_TEST_FIFO});
 	POSIX::mkfifo($env_vars->{SMBD_TEST_FIFO}, 0700);
 	unlink($env_vars->{SMBD_TEST_LOG});
 	
-	my $valgrind = "";
-	if (defined($ENV{SMBD_VALGRIND})) {
-		$valgrind = $ENV{SMBD_VALGRIND};
-	} 
-
 	print "STARTING SMBD... ";
 	my $pid = fork();
 	if ($pid == 0) {
 		open STDIN, $env_vars->{SMBD_TEST_FIFO};
 		open STDOUT, ">$env_vars->{SMBD_TEST_LOG}";
 		open STDERR, '>&STDOUT';
+		
+		SocketWrapper::set_default_iface(1);
+		
+		# Start slapd before smbd, but with the fifo on stdin
+		if (defined($self->{ldap})) {
+		    $self->slapd_start($env_vars) or 
+			die("couldn't start slapd");
+		    
+		    print "LDAP PROVISIONING...";
+		    $self->provision_ldap($env_vars);
+		}
+		
+		my $valgrind = "";
+		if (defined($ENV{SMBD_VALGRIND})) {
+		    $valgrind = $ENV{SMBD_VALGRIND};
+		} 
+
+		$ENV{KRB5_CONFIG} = $env_vars->{KRB5_CONFIG}; 
+
 		my $optarg = "";
 		if (defined($max_time)) {
 			$optarg = "--maximum-runtime=$max_time ";



More information about the samba-cvs mailing list