diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-04-20 11:40:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:16 -0500 |
commit | 3c070cb7c4e4a0690f8b29491825b1597f7d1cd0 (patch) | |
tree | c4c07c3a4b73ed21e6819c076274b2cddc4a1394 /source4 | |
parent | a81f2396a423b7e4b84bfcddf4a724607d45f999 (diff) | |
download | samba-3c070cb7c4e4a0690f8b29491825b1597f7d1cd0.tar.gz samba-3c070cb7c4e4a0690f8b29491825b1597f7d1cd0.tar.bz2 samba-3c070cb7c4e4a0690f8b29491825b1597f7d1cd0.zip |
r22409: try to fix selftest.pl on systems with old perl versions
metze
(This used to be commit 81a2a144df651bb37995c718fc9f7d7bffa9bac9)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/script/tests/Samba3.pm | 7 | ||||
-rw-r--r-- | source4/script/tests/Samba4.pm | 8 | ||||
-rw-r--r-- | source4/script/tests/SocketWrapper.pm | 4 | ||||
-rwxr-xr-x | source4/script/tests/selftest.pl | 6 |
4 files changed, 12 insertions, 13 deletions
diff --git a/source4/script/tests/Samba3.pm b/source4/script/tests/Samba3.pm index 3c8a2c06dd..8e11f4cee9 100644 --- a/source4/script/tests/Samba3.pm +++ b/source4/script/tests/Samba3.pm @@ -8,7 +8,6 @@ package Samba3; use strict; use Cwd qw(abs_path); use FindBin qw($RealBin); -use POSIX; sub binpath($$) { @@ -203,12 +202,12 @@ sub provision($$) ## ## create the test directory layout ## - mkdir($prefix_abs); + mkdir($prefix_abs, 0777); print "CREATE TEST ENVIRONMENT IN '$prefix'..."; system("rm -rf $prefix_abs/*"); - mkdir($_) foreach($privatedir,$libdir,$piddir,$lockdir,$logdir); + mkdir($_, 0777) foreach($privatedir,$libdir,$piddir,$lockdir,$logdir); my $tmpdir = "$prefix_abs/tmp"; - mkdir($tmpdir); + mkdir($tmpdir, 0777); chmod 0777, $tmpdir; open(CONF, ">$conffile") or die("Unable to open $conffile"); diff --git a/source4/script/tests/Samba4.pm b/source4/script/tests/Samba4.pm index e393fe7798..d5633aba30 100644 --- a/source4/script/tests/Samba4.pm +++ b/source4/script/tests/Samba4.pm @@ -173,7 +173,7 @@ sub mk_fedora($$$$$$) { my ($self, $ldapdir, $basedn, $root, $password, $privatedir, $configuration) = @_; - mkdir($ldapdir); + mkdir($ldapdir, 0777); my $fedora_ds_inf = "$ldapdir/fedorads.inf"; my $fedora_ds_initial_ldif = "$ldapdir/fedorads-initial.ldif"; @@ -270,7 +270,7 @@ sub mk_openldap($$$$$$$$) my $pidfile = "$ldapdir/slapd.pid"; my $modconf = "$ldapdir/modules.conf"; - mkdir($_) foreach ($ldapdir, "$ldapdir/db", "$ldapdir/db/bdb-logs", + mkdir($_, 0777) foreach ($ldapdir, "$ldapdir/db", "$ldapdir/db/bdb-logs", "$ldapdir/db/tmp"); open(CONF, ">$slapd_conf"); @@ -405,7 +405,7 @@ sub provision($$$$$) my $root = ($ENV{USER} or $ENV{LOGNAME} or `whoami`); my $server = "localhost"; my $srcdir="$RealBin/../.."; - -d $prefix or mkdir($prefix) or die("Unable to create $prefix"); + -d $prefix or mkdir($prefix, 0777) or die("Unable to create $prefix"); my $prefix_abs = abs_path($prefix); my $tmpdir = "$prefix_abs/tmp"; my $etcdir = "$prefix_abs/etc"; @@ -426,7 +426,7 @@ sub provision($$$$$) my $interfaces = "$ifaceipv4/8"; (system("rm -rf $prefix/*") == 0) or die("Unable to clean up"); - mkdir($_) foreach ($privatedir, $etcdir, $piddir, $ncalrpcdir, $lockdir, + mkdir($_, 0777) foreach ($privatedir, $etcdir, $piddir, $ncalrpcdir, $lockdir, $tmpdir); open(CONFFILE, ">$conffile"); diff --git a/source4/script/tests/SocketWrapper.pm b/source4/script/tests/SocketWrapper.pm index aa913d240e..e63605b8df 100644 --- a/source4/script/tests/SocketWrapper.pm +++ b/source4/script/tests/SocketWrapper.pm @@ -21,7 +21,7 @@ sub setup_dir($$) if ( -d $dir ) { unlink <$dir/*>; } else { - mkdir($dir); + mkdir($dir, 0777); } if ($pcap) { @@ -30,7 +30,7 @@ sub setup_dir($$) if ( -d $pcap_dir ) { unlink <$pcap_dir/*>; } else { - mkdir($pcap_dir); + mkdir($pcap_dir, 0777); } } } diff --git a/source4/script/tests/selftest.pl b/source4/script/tests/selftest.pl index a9b1708f60..1d9f58a11a 100755 --- a/source4/script/tests/selftest.pl +++ b/source4/script/tests/selftest.pl @@ -494,7 +494,7 @@ $prefix =~ s+/$++; die("using an empty prefix isn't allowed") unless $prefix ne ""; #Ensure we have the test prefix around -mkdir $prefix unless -d $prefix; +mkdir($prefix, 0777) unless -d $prefix; my $prefix_abs = abs_path($prefix); my $srcdir_abs = abs_path($srcdir); @@ -581,12 +581,12 @@ sub write_clientconf($$) { my ($conffile, $vars) = @_; - mkdir "$prefix/client" unless -d "$prefix/client"; + mkdir("$prefix/client", 0777) unless -d "$prefix/client"; if ( -d "$prefix/client/private" ) { unlink <$prefix/client/private/*>; } else { - mkdir("$prefix/client/private"); + mkdir("$prefix/client/private", 0777); } open(CF, ">$conffile"); |