Commit 3c070cb7 authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Gerald (Jerry) Carter

r22409: try to fix selftest.pl on systems with old perl versions

metze
(This used to be commit 81a2a144)
parent a81f2396
......@@ -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");
......
......@@ -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");
......
......@@ -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);
}
}
}
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment