summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_sockinit.c4
-rw-r--r--source3/winbindd/winbindd_util.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_sockinit.c b/source3/winbindd/winbindd_sockinit.c
index 50c53a5045..886b67fb47 100644
--- a/source3/winbindd/winbindd_sockinit.c
+++ b/source3/winbindd/winbindd_sockinit.c
@@ -35,7 +35,7 @@ static int open_winbindd_socket(void)
{
if (_winbindd_socket == -1) {
_winbindd_socket = create_pipe_sock(
- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME, 0755);
+ get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME, 0755);
DEBUG(10, ("open_winbindd_socket: opened socket fd %d\n",
_winbindd_socket));
}
@@ -119,7 +119,7 @@ void winbindd_release_sockets(void)
/* Remove socket file */
if (unlink_winbindd_socket) {
pstr_sprintf(path, "%s/%s",
- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
+ get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME);
unlink(path);
}
}
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 37d29e1765..c1600823fc 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -1158,6 +1158,11 @@ void fill_domain_username(fstring name, const char *domain, const char *user, BO
* Winbindd socket accessor functions
*/
+const char *get_winbind_pipe_dir(void)
+{
+ return lp_parm_const_string(-1, "winbindd", "socket dir", WINBINDD_SOCKET_DIR);
+}
+
char *get_winbind_priv_pipe_dir(void)
{
return lock_path(WINBINDD_PRIV_SOCKET_SUBDIR);