diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-05-22 19:40:19 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-05-23 13:26:33 +0200 |
commit | 8167e840738febd3fad47094f3e948545c6f0677 (patch) | |
tree | a5595b6befe8a0b2c28d0f4b343ba67da327f5ef | |
parent | 28d728273834e740e15d32a9eedec8c8760abae3 (diff) | |
download | samba-8167e840738febd3fad47094f3e948545c6f0677.tar.gz samba-8167e840738febd3fad47094f3e948545c6f0677.tar.bz2 samba-8167e840738febd3fad47094f3e948545c6f0677.zip |
selftest: create ncalrpcdir with 0755 permissions
We need to reset the umask in order to set to the desired permissions.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 23 13:26:33 CEST 2011 on sn-devel-104
-rwxr-xr-x | selftest/selftest.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 6f8cbe1fe8..23434fc86c 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -597,11 +597,20 @@ sub write_clientconf($$$) mkdir("$clientdir/lockdir", 0777); } + # this is ugly, but the ncalrpcdir needs exactly 0755 + # otherwise tests fail. + my $mask = umask; + umask 0022; + if ( -d "$clientdir/ncalrpcdir/np" ) { + unlink <$clientdir/ncalrpcdir/np/*>; + rmdir <$clientdir/ncalrpcdir/np>; + } if ( -d "$clientdir/ncalrpcdir" ) { unlink <$clientdir/ncalrpcdir/*>; - } else { - mkdir("$clientdir/ncalrpcdir", 0777); + rmdir <$clientdir/ncalrpcdir>; } + mkdir("$clientdir/ncalrpcdir", 0755); + umask $mask; open(CF, ">$conffile"); print CF "[global]\n"; |