diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-04-27 22:18:18 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-04-28 05:30:21 +0200 |
commit | b44f4325bb454b10323f1d4576343a9d3e6260ab (patch) | |
tree | 727c347ac6f4749371e3acf6abfd988432af7b27 /selftest | |
parent | fb5e1f4a65042b89c74e545cb739f1720565807d (diff) | |
download | samba-b44f4325bb454b10323f1d4576343a9d3e6260ab.tar.gz samba-b44f4325bb454b10323f1d4576343a9d3e6260ab.tar.bz2 samba-b44f4325bb454b10323f1d4576343a9d3e6260ab.zip |
selftest: Don't die() when the join fails
This kills off everything without a proper shutdown, and is difficult
to debug.
Andrew Bartlett
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/target/Samba3.pm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index d6dbe0cfa3..1c158f9341 100644 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -178,7 +178,10 @@ sub setup_member($$$) $cmd .= "$net join $ret->{CONFIGURATION} $s3dcvars->{DOMAIN} member"; $cmd .= " -U$s3dcvars->{USERNAME}\%$s3dcvars->{PASSWORD}"; - system($cmd) == 0 or die("Join failed\n$cmd"); + if (system($cmd) != 0) { + warn("Join failed\n$cmd"); + return undef; + } $self->check_or_start($ret, "yes", "yes", "yes"); @@ -239,7 +242,10 @@ sub setup_admember($$$$) $cmd .= "$net join $ret->{CONFIGURATION}"; $cmd .= " -U$dcvars->{USERNAME}\%$dcvars->{PASSWORD}"; - system($cmd) == 0 or die("Join failed\n$cmd"); + if (system($cmd) != 0) { + warn("Join failed\n$cmd"); + return undef; + } $self->check_or_start($ret, "yes", "yes", "yes"); @@ -251,10 +257,13 @@ sub setup_admember($$$$) $cmd = ""; $cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$ret->{SOCKET_WRAPPER_DEFAULT_IFACE}\" "; $cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" "; - $cmd .= "$smbcacls //127.0.0.29/tmp / -U$ret->{USERNAME}%$ret->{PASSWORD} "; - $cmd .= "$ret->{CONFIGURATION} -S ACL:$dcvars->{DOMAIN}\\\\Domain\\ Users:ALLOWED/0x0/FULL"; + $cmd .= "$smbcacls $ret->{CONFIGURATION} //127.0.0.29/tmp / -U$ret->{USERNAME}%$ret->{PASSWORD} "; + $cmd .= "-S ACL:$dcvars->{DOMAIN}\\\\Domain\\ Users:ALLOWED/0x0/FULL"; - system($cmd) == 0 or die("Join failed\n$cmd"); + if (system($cmd) != 0) { + warn("smbcacls failed\n$cmd"); + return undef; + } $ret->{DC_SERVER} = $dcvars->{SERVER}; $ret->{DC_SERVER_IP} = $dcvars->{SERVER_IP}; |