diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-15 18:55:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:48 -0500 |
commit | 93bdd2724cc711005a5f2f223b499199394e78e7 (patch) | |
tree | 869fed688287bd8bdce9dea6936d9b39349192d2 /source/nsswitch/wb_common.c | |
parent | 37cf2c272751065245dd46708af0a78f1f0c47df (diff) | |
download | samba-93bdd2724cc711005a5f2f223b499199394e78e7.tar.gz samba-93bdd2724cc711005a5f2f223b499199394e78e7.tar.xz samba-93bdd2724cc711005a5f2f223b499199394e78e7.zip |
r25177: if configured using --enable-socket-wrapper
allow overwritting the location of the WINBINDD_SOCKET_DIR
via an environment variable
metze
Diffstat (limited to 'source/nsswitch/wb_common.c')
-rw-r--r-- | source/nsswitch/wb_common.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c index bc65239b1b9..2ae85dcb1eb 100644 --- a/source/nsswitch/wb_common.c +++ b/source/nsswitch/wb_common.c @@ -280,6 +280,20 @@ static int winbind_named_pipe_sock(const char *dir) return -1; } +static const char *winbindd_socket_dir(void) +{ +#ifdef SOCKET_WRAPPER + const char *env_dir; + + env_dir = getenv(WINBINDD_SOCKET_DIR_ENVVAR); + if (env_dir) { + return env_dir; + } +#endif + + return WINBINDD_SOCKET_DIR; +} + /* Connect to winbindd socket */ static int winbind_open_pipe_sock(int recursing, int need_priv) @@ -308,7 +322,7 @@ static int winbind_open_pipe_sock(int recursing, int need_priv) return -1; } - if ((winbindd_fd = winbind_named_pipe_sock(WINBINDD_SOCKET_DIR)) == -1) { + if ((winbindd_fd = winbind_named_pipe_sock(winbindd_socket_dir())) == -1) { return -1; } |