1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

r21790: Setup the socket_wrapper_dir when we set the environment variable.

Andrew Bartlett
(This used to be commit 5c07dbd2487c5c23355ad0e3db6e9f9caf8ce145)
This commit is contained in:
Andrew Bartlett 2007-03-12 00:24:03 +00:00 committed by Gerald (Jerry) Carter
parent 7b706c7091
commit 67e22aa6ff
2 changed files with 8 additions and 8 deletions

View File

@ -58,14 +58,6 @@ sub smbd_check_or_start($$$$$$)
warn("Not using socket wrapper, but also not running as root. Will not be able to listen on proper ports") unless
defined($socket_wrapper_dir) or $< == 0;
if (defined($socket_wrapper_dir)) {
if ( -d $socket_wrapper_dir ) {
unlink <$socket_wrapper_dir/*>;
} else {
mkdir($socket_wrapper_dir);
}
}
unlink($test_fifo);
POSIX::mkfifo($test_fifo, 0700);
unlink($test_log);

View File

@ -15,6 +15,14 @@ use FindBin qw($RealBin);
sub setup_dir($)
{
my ($dir) = @_;
if (defined($dir)) {
if ( -d $dir ) {
unlink <$dir/*>;
} else {
mkdir($dir);
}
}
$ENV{SOCKET_WRAPPER_DIR} = $dir;
return $dir;
}