summaryrefslogtreecommitdiff
path: root/selftest/selftest.pl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-04-07 10:39:31 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-04-10 01:11:19 +0200
commit20404e19b900af7ae30e0897323b52eb51e7f950 (patch)
tree1f6c28a8e4069d1f5c0f03b5975df045701bceb6 /selftest/selftest.pl
parent6d6117b5ba510d169cbc0c285edc75c24f60625a (diff)
downloadsamba-20404e19b900af7ae30e0897323b52eb51e7f950.tar.gz
selftest: make sure we don't have any umask limitations for selftest
We create $prefix with 0700 (umask 0077), but everything else should not have a umask limitation (by default). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12709 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-xselftest/selftest.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 45e0ae0451f..32fc845bde5 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -307,8 +307,11 @@ die("using an empty prefix isn't allowed") unless $prefix ne "";
# permissions on this as some subdirectories in this tree will have
# wider permissions (ie 0777) and this would allow other users on the
# host to subvert the test process.
+umask 0077;
mkdir($prefix, 0700) unless -d $prefix;
chmod 0700, $prefix;
+# We need to have no umask limitations for the tests.
+umask 0000;
my $prefix_abs = abs_path($prefix);
my $tmpdir_abs = abs_path("$prefix/tmp");