1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

selftest:Samba4: avoid File::Path 'make_path' in setup_dns_hub_internal()

While spliting the build and test stages I hit strange permission
problems, when a parent directory is missing,
which can be avoided by using plain mkdir() on each level.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-12-17 10:42:03 +01:00 committed by Andreas Schneider
parent 0230122238
commit 719eccd445

View File

@ -17,7 +17,6 @@ use SocketWrapper;
use target::Samba;
use target::Samba3;
use Archive::Tar;
use File::Path 'make_path';
sub new($$$$$) {
my ($classname, $SambaCtx, $bindir, $srcdir, $server_maxtime) = @_;
@ -281,7 +280,7 @@ sub setup_dns_hub_internal($$$)
my ($self, $hostname, $prefix) = @_;
my $STDIN_READER;
unless(-d $prefix or make_path($prefix, 0777)) {
unless(-d $prefix or mkdir($prefix, 0777)) {
warn("Unable to create $prefix");
return undef;
}
@ -356,6 +355,10 @@ sub setup_dns_hub
my $hostname = "rootdnsforwarder";
unless(-d $prefix or mkdir($prefix, 0777)) {
warn("Unable to create $prefix");
return undef;
}
my $env = $self->setup_dns_hub_internal("$hostname", "$prefix/$hostname");
$self->{dns_hub_env} = $env;