summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-19 17:19:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:52 -0500
commit0805a4bc715f055fd68c5e27bd46eadfb101e1b9 (patch)
tree6d1ca9064bd2266d80c3527962fe566ee750ddaa /source3/winbindd
parent68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea (diff)
downloadsamba-0805a4bc715f055fd68c5e27bd46eadfb101e1b9.tar.gz
samba-0805a4bc715f055fd68c5e27bd46eadfb101e1b9.tar.bz2
samba-0805a4bc715f055fd68c5e27bd46eadfb101e1b9.zip
r25236: make it possible to alter WINBINDD_SOCKET_DIR via
"winbindd:socket dir=/path/to/dir" for usage in make test metze (This used to be commit 5566cf01e827edf60c0235a661d95dd376210108)
Diffstat (limited to 'source3/winbindd')
-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);