diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-05-30 14:55:52 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-05-31 06:34:36 +0000 |
commit | b23d005cdc646e02af3c38852f75e4505070768e (patch) | |
tree | 0a18287399b0fdc764b23079552d066b7f6552a9 /selftest | |
parent | 6defc1f183d6a9f24af1674d1dfee36d9e9bdc76 (diff) | |
download | samba-b23d005cdc646e02af3c38852f75e4505070768e.tar.gz |
selftest: Don't use global dirs when parsing customdc realm
When creating the customdc, testparm would default to using
/usr/local/samba sub-directories for creating sockets and lock files.
Instead, pass in the tmpdir we just created as an option to the command.
Normally this didn't cause a noticeable problem, however, if we run the
command with UID-wrapper but without socket-wrapper (i.e.
USE_NAMESPACES=1), then it fails completely.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 31 06:34:36 UTC 2019 on sn-devel-184
Diffstat (limited to 'selftest')
-rwxr-xr-x | selftest/target/Samba4.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index d647a5c29a0..c661a109e64 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -3280,10 +3280,15 @@ sub get_backup_domain_realm return undef, undef; } + # make sure we don't try to create locks/sockets in the default install + # location (i.e. /usr/local/samba/) + my $options = "--option=\"private dir = $tmpdir\""; + $options .= " --option=\"lock dir = $tmpdir\""; + # now use testparm to read the values we're interested in my $testparm = Samba::bindir_path($self, "testparm"); - my $domain = `$testparm $smbconf -sl --parameter-name=WORKGROUP`; - my $realm = `$testparm $smbconf -sl --parameter-name=REALM`; + my $domain = `$testparm $smbconf -sl --parameter-name=WORKGROUP $options`; + my $realm = `$testparm $smbconf -sl --parameter-name=REALM $options`; chomp $realm; chomp $domain; print "Backup-file REALM is $realm, DOMAIN is $domain\n"; |