From 8167e840738febd3fad47094f3e948545c6f0677 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 22 May 2011 19:40:19 +0200 Subject: 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 Autobuild-Date: Mon May 23 13:26:33 CEST 2011 on sn-devel-104 --- selftest/selftest.pl | 13 +++++++++++-- 1 file 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"; -- cgit