1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

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

metze
This commit is contained in:
Stefan Metzmacher 2007-04-20 11:40:44 +00:00 committed by Gerald (Jerry) Carter
parent c7518d6140
commit 81a2a144df
4 changed files with 12 additions and 13 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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);
}
}
}

View File

@ -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");