summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-28 22:15:44 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-29 10:31:48 +0100
commit67bf7a2396051d10c07aeaa2d8b373a96a44d892 (patch)
treebd7a13dc3ec8b0a3c1d410a83e10a443a4dae313 /selftest
parent9f8d80c69921ee5c3941fde08aba3a12d3194415 (diff)
downloadsamba-67bf7a2396051d10c07aeaa2d8b373a96a44d892.tar.gz
samba-67bf7a2396051d10c07aeaa2d8b373a96a44d892.tar.bz2
samba-67bf7a2396051d10c07aeaa2d8b373a96a44d892.zip
selftest: fix Samba3 bugs
metze
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/selftest.pl1
-rw-r--r--selftest/target/Samba3.pm34
2 files changed, 19 insertions, 16 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index d47261da79..dc754efa17 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -580,6 +580,7 @@ sub write_clientconf($$)
}
if (defined($vars->{WINBINDD_SOCKET_DIR})) {
print CF "\twinbindd socket directory = $vars->{WINBINDD_SOCKET_DIR}\n";
+ print CF "\twinbindd:socket dir = $vars->{WINBINDD_SOCKET_DIR}\n";
}
if ($opt_socket_wrapper) {
print CF "\tinterfaces = $interfaces\n";
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 0a9dd79fc8..2b2f6a51b5 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -265,7 +265,6 @@ sub create_clientconf($$$)
my $logdir = "$prefix/logs";
my $piddir = "$prefix/pid";
my $privatedir = "$prefix/private";
- my $scriptdir = "$RealBin/..";
my $conffile = "$prefix/smb.conf";
my $torture_interfaces='127.0.0.6/8,127.0.0.7/8,127.0.0.8/8,127.0.0.9/8,127.0.0.10/8,127.0.0.11/8';
@@ -284,7 +283,7 @@ sub create_clientconf($$$)
netbios name = TORTURE_6
interfaces = $torture_interfaces
- panic action = $scriptdir/gdb_backtrace \%d %\$(MAKE_TEST_BINARY)
+ panic action = $RealBin/gdb_backtrace \%d %\$(MAKE_TEST_BINARY)
passdb backend = tdbsam
";
@@ -308,10 +307,7 @@ sub provision($$$$$$)
my $unix_uid = $>;
my $unix_gids_str = $);
my @unix_gids = split(" ", $unix_gids_str);
- my $password = "test";
- my $srcdir="$RealBin/..";
- my $scriptdir="$srcdir/selftest";
my $prefix_abs = abs_path($prefix);
my $bindir_abs = abs_path($self->{bindir});
@@ -349,7 +345,7 @@ sub provision($$$$$$)
my $conffile="$libdir/server.conf";
- my $nss_wrapper_pl = "$ENV{PERL} $srcdir/../lib/nss_wrapper/nss_wrapper.pl";
+ my $nss_wrapper_pl = "$ENV{PERL} $RealBin/../lib/nss_wrapper/nss_wrapper.pl";
my $nss_wrapper_passwd = "$privatedir/passwd";
my $nss_wrapper_group = "$privatedir/group";
@@ -359,7 +355,7 @@ sub provision($$$$$$)
netbios name = $server
interfaces = $server_ip/8
bind interfaces only = yes
- panic action = $scriptdir/gdb_backtrace %d %\$(MAKE_TEST_BINARY)
+ panic action = $RealBin/gdb_backtrace %d %\$(MAKE_TEST_BINARY)
workgroup = $domain
@@ -408,8 +404,13 @@ sub provision($$$$$$)
# End extra options
#Include user defined custom parameters if set
- $ENV{INCLUDE_CUSTOM_CONF}
+";
+
+ if (defined($ENV{INCLUDE_CUSTOM_CONF})) {
+ print CONF "\t$ENV{INCLUDE_CUSTOM_CONF}\n";
+ }
+ print CONF "
[tmp]
path = $shrdir
[hideunread]
@@ -436,15 +437,13 @@ sub provision($$$$$$)
##
open(PASSWD, ">$nss_wrapper_passwd") or die("Unable to open $nss_wrapper_passwd");
- print PASSWD "
-nobody:x:65534:65533:nobody gecos:$prefix_abs:/bin/false
+ print PASSWD "nobody:x:65534:65533:nobody gecos:$prefix_abs:/bin/false
$unix_name:x:$unix_uid:$unix_gids[0]:$unix_name gecos:$prefix_abs:/bin/false
";
close(PASSWD);
open(GROUP, ">$nss_wrapper_group") or die("Unable to open $nss_wrapper_group");
- print GROUP "
-nobody:x:65533:
+ print GROUP "nobody:x:65533:
nogroup:x:65534:nobody
$unix_name-group:x:$unix_gids[0]:
";
@@ -457,15 +456,18 @@ $unix_name-group:x:$unix_gids[0]:
print PWD "$password\n$password\n";
close(PWD) or die("Unable to set password for test account");
- $ENV{NSS_WRAPPER_PASSWD} = undef;
- $ENV{NSS_WRAPPER_GROUP} = undef;
+ delete $ENV{NSS_WRAPPER_PASSWD};
+ delete $ENV{NSS_WRAPPER_GROUP};
print "DONE\n";
$ret{SERVER_IP} = $server_ip;
$ret{NMBD_TEST_LOG} = "$prefix/nmbd_test.log";
+ $ret{NMBD_TEST_LOG_POS} = 0;
$ret{WINBINDD_TEST_LOG} = "$prefix/winbindd_test.log";
+ $ret{WINBINDD_TEST_LOG_POS} = 0;
$ret{SMBD_TEST_LOG} = "$prefix/smbd_test.log";
+ $ret{SMBD_TEST_LOG_POS} = 0;
$ret{SERVERCONFFILE} = $conffile;
$ret{CONFIGURATION} ="-s $conffile";
$ret{SERVER} = $server;
@@ -476,7 +478,7 @@ $unix_name-group:x:$unix_gids[0]:
$ret{PIDDIR} = $piddir;
$ret{WINBINDD_SOCKET_DIR} = $wbsockdir;
$ret{WINBINDD_PRIV_PIPE_DIR} = $wbsockprivdir;
- $ret{SOCKET_WRAPPER_DEFAULT_IFACE} => $swiface,
+ $ret{SOCKET_WRAPPER_DEFAULT_IFACE} = $swiface;
$ret{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd;
$ret{NSS_WRAPPER_GROUP} = $nss_wrapper_group;
@@ -504,7 +506,7 @@ sub wait_for_start($$)
print "creating BUILTIN\\Administrators\n";
$ENV{WINBINDD_SOCKET_DIR} = $envvars->{WINBINDD_SOCKET_DIR};
system($self->binpath("net") ." $envvars->{CONFIGURATION} sam createbuiltingroup Administrators");
- $ENV{WINBINDD_SOCKET_DIR} = undef;
+ delete $ENV{WINBINDD_SOCKET_DIR};
print $self->getlog_env($envvars);
}