mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
selftest: Rename WINBINDD_SOCKET_DIR environment variable.
It is very confusing if the env var uses the same name as the define in the source code. So prefix it with SELFTEST. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
c29fb2e615
commit
2522bb8090
@ -320,7 +320,7 @@ static const char *winbindd_socket_dir(void)
|
||||
if (nss_wrapper_enabled()) {
|
||||
const char *env_dir;
|
||||
|
||||
env_dir = getenv(WINBINDD_SOCKET_DIR_ENVVAR);
|
||||
env_dir = getenv("SELFTEST_WINBINDD_SOCKET_DIR");
|
||||
if (env_dir != NULL) {
|
||||
return env_dir;
|
||||
}
|
||||
|
@ -36,13 +36,6 @@ typedef char fstring[FSTRING_LEN];
|
||||
* mechanism.
|
||||
*/
|
||||
|
||||
/*
|
||||
* when compiled with socket_wrapper support
|
||||
* the location of the WINBINDD_SOCKET_DIR
|
||||
* can be overwritten via an environment variable
|
||||
*/
|
||||
#define WINBINDD_SOCKET_DIR_ENVVAR "WINBINDD_SOCKET_DIR"
|
||||
|
||||
#define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lock_directory() to hold the 'privileged' pipe */
|
||||
#define WINBINDD_DOMAIN_ENV "WINBINDD_DOMAIN" /* Environment variables */
|
||||
#define WINBINDD_DONT_ENV "_NO_WINBINDD"
|
||||
|
@ -744,7 +744,7 @@ my @exported_envvars = (
|
||||
|
||||
# misc stuff
|
||||
"KRB5_CONFIG",
|
||||
"WINBINDD_SOCKET_DIR",
|
||||
"SELFTEST_WINBINDD_SOCKET_DIR",
|
||||
"WINBINDD_PRIV_PIPE_DIR",
|
||||
"NMBD_SOCKET_DIR",
|
||||
"LOCAL_PATH",
|
||||
|
@ -636,7 +636,7 @@ sub check_or_start($$$$$) {
|
||||
SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE});
|
||||
|
||||
$ENV{KRB5_CONFIG} = $env_vars->{KRB5_CONFIG};
|
||||
$ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR};
|
||||
$ENV{SELFTEST_WINBINDD_SOCKET_DIR} = $env_vars->{SELFTEST_WINBINDD_SOCKET_DIR};
|
||||
$ENV{NMBD_SOCKET_DIR} = $env_vars->{NMBD_SOCKET_DIR};
|
||||
|
||||
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
|
||||
@ -693,7 +693,7 @@ sub check_or_start($$$$$) {
|
||||
SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE});
|
||||
|
||||
$ENV{KRB5_CONFIG} = $env_vars->{KRB5_CONFIG};
|
||||
$ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR};
|
||||
$ENV{SELFTEST_WINBINDD_SOCKET_DIR} = $env_vars->{SELFTEST_WINBINDD_SOCKET_DIR};
|
||||
$ENV{NMBD_SOCKET_DIR} = $env_vars->{NMBD_SOCKET_DIR};
|
||||
|
||||
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
|
||||
@ -750,7 +750,7 @@ sub check_or_start($$$$$) {
|
||||
SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE});
|
||||
|
||||
$ENV{KRB5_CONFIG} = $env_vars->{KRB5_CONFIG};
|
||||
$ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR};
|
||||
$ENV{SELFTEST_WINBINDD_SOCKET_DIR} = $env_vars->{SELFTEST_WINBINDD_SOCKET_DIR};
|
||||
$ENV{NMBD_SOCKET_DIR} = $env_vars->{NMBD_SOCKET_DIR};
|
||||
|
||||
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
|
||||
@ -1261,7 +1261,7 @@ domadmins:X:$gid_domadmins:
|
||||
$ret{NETBIOSNAME} = $server;
|
||||
$ret{PASSWORD} = $password;
|
||||
$ret{PIDDIR} = $piddir;
|
||||
$ret{WINBINDD_SOCKET_DIR} = $wbsockdir;
|
||||
$ret{SELFTEST_WINBINDD_SOCKET_DIR} = $wbsockdir;
|
||||
$ret{WINBINDD_PRIV_PIPE_DIR} = $wbsockprivdir;
|
||||
$ret{NMBD_SOCKET_DIR} = $nmbdsockdir;
|
||||
$ret{SOCKET_WRAPPER_DEFAULT_IFACE} = $swiface;
|
||||
@ -1298,7 +1298,7 @@ sub wait_for_start($$$$$)
|
||||
print "checking for winbindd\n";
|
||||
my $count = 0;
|
||||
do {
|
||||
$ret = system("WINBINDD_SOCKET_DIR=" . $envvars->{WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " -p");
|
||||
$ret = system("SELFTEST_WINBINDD_SOCKET_DIR=" . $envvars->{SELFTEST_WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " -p");
|
||||
if ($ret != 0) {
|
||||
sleep(2);
|
||||
}
|
||||
@ -1343,7 +1343,7 @@ sub wait_for_start($$$$$)
|
||||
if ($winbindd eq "yes") {
|
||||
# note: creating builtin groups requires winbindd for the
|
||||
# unix id allocator
|
||||
$ret = system("WINBINDD_SOCKET_DIR=" . $envvars->{WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "net") ." $envvars->{CONFIGURATION} sam createbuiltingroup Users");
|
||||
$ret = system("SELFTEST_WINBINDD_SOCKET_DIR=" . $envvars->{SELFTEST_WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "net") ." $envvars->{CONFIGURATION} sam createbuiltingroup Users");
|
||||
if ($ret != 0) {
|
||||
print "Failed to create BUILTIN\\Users group\n";
|
||||
return 0;
|
||||
@ -1351,7 +1351,7 @@ sub wait_for_start($$$$$)
|
||||
my $count = 0;
|
||||
do {
|
||||
system(Samba::bindir_path($self, "net") . " $envvars->{CONFIGURATION} cache flush");
|
||||
$ret = system("WINBINDD_SOCKET_DIR=" . $envvars->{WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " --sid-to-gid=S-1-5-32-545");
|
||||
$ret = system("SELFTEST_WINBINDD_SOCKET_DIR=" . $envvars->{SELFTEST_WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " --sid-to-gid=S-1-5-32-545");
|
||||
if ($ret != 0) {
|
||||
sleep(2);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ sub check_or_start($$$)
|
||||
SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE});
|
||||
|
||||
$ENV{KRB5_CONFIG} = $env_vars->{KRB5_CONFIG};
|
||||
$ENV{WINBINDD_SOCKET_DIR} = $env_vars->{WINBINDD_SOCKET_DIR};
|
||||
$ENV{SELFTEST_WINBINDD_SOCKET_DIR} = $env_vars->{SELFTEST_WINBINDD_SOCKET_DIR};
|
||||
$ENV{NMBD_SOCKET_DIR} = $env_vars->{NMBD_SOCKET_DIR};
|
||||
|
||||
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
|
||||
@ -724,7 +724,7 @@ nogroup:x:65534:nobody
|
||||
PASSWORD => $ctx->{password},
|
||||
LDAPDIR => $ctx->{ldapdir},
|
||||
LDAP_INSTANCE => $ctx->{ldap_instance},
|
||||
WINBINDD_SOCKET_DIR => $ctx->{winbindd_socket_dir},
|
||||
SELFTEST_WINBINDD_SOCKET_DIR => $ctx->{winbindd_socket_dir},
|
||||
NCALRPCDIR => $ctx->{ncalrpcdir},
|
||||
LOCKDIR => $ctx->{lockdir},
|
||||
STATEDIR => $ctx->{statedir},
|
||||
|
@ -328,7 +328,7 @@ static const char *winbindd_socket_dir(void)
|
||||
if (nss_wrapper_enabled()) {
|
||||
const char *env_dir;
|
||||
|
||||
env_dir = getenv(WINBINDD_SOCKET_DIR_ENVVAR);
|
||||
env_dir = getenv("SELFTEST_WINBINDD_SOCKET_DIR");
|
||||
if (env_dir != NULL) {
|
||||
return env_dir;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ static const char *winbindd_socket_dir(void)
|
||||
#ifdef SOCKET_WRAPPER
|
||||
const char *env_dir;
|
||||
|
||||
env_dir = getenv(WINBINDD_SOCKET_DIR_ENVVAR);
|
||||
env_dir = getenv("SELFTEST_WINBINDD_SOCKET_DIR");
|
||||
if (env_dir) {
|
||||
return env_dir;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export NETBIOSNAME=localdc1
|
||||
export REALM=SAMBA.EXAMPLE.COM
|
||||
export SOCKET_WRAPPER_DEFAULT_IFACE=21
|
||||
export SERVER=localdc1
|
||||
export WINBINDD_SOCKET_DIR=$PWD/st/dc/winbindd_socket
|
||||
export SELFTEST_WINBINDD_SOCKET_DIR=$PWD/st/dc/winbindd_socket
|
||||
export SELFTEST_PREFIX=$PWD/st
|
||||
export DOMAIN=SAMBADOMAIN
|
||||
export BINDIR=./bin
|
||||
|
Loading…
Reference in New Issue
Block a user