diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-05-17 19:34:32 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-05-31 21:36:55 +0200 |
commit | 61eb56be4ea1f4eb26f63b985aeb52cdb1183328 (patch) | |
tree | 22df8a98d7a653c8a94e1d0aa19e3bf1e7556c61 /source3/winbindd/winbindd_util.c | |
parent | e5ebc52e9fd45346a74e2c421f2471b5e6cab998 (diff) | |
download | samba-61eb56be4ea1f4eb26f63b985aeb52cdb1183328.tar.gz samba-61eb56be4ea1f4eb26f63b985aeb52cdb1183328.tar.xz samba-61eb56be4ea1f4eb26f63b985aeb52cdb1183328.zip |
s3:winbind tidy up connecting the winbind sockets.
By putting this code inline in winbindd_setup_listeners() we remove 2
static variables and simplify the code.
By putting the get_winbind_priv_pipe_dir() in the same file, we allow
it to be reimplemented in s3compat.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_util.c')
-rw-r--r-- | source3/winbindd/winbindd_util.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 970e599e2b..735a446e07 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -1029,49 +1029,6 @@ char *fill_domain_username_talloc(TALLOC_CTX *mem_ctx, } /* - * 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); -} - -/* Open the winbindd socket */ - -static int _winbindd_socket = -1; -static int _winbindd_priv_socket = -1; - -int open_winbindd_socket(void) -{ - if (_winbindd_socket == -1) { - _winbindd_socket = create_pipe_sock( - get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME, 0755); - DEBUG(10, ("open_winbindd_socket: opened socket fd %d\n", - _winbindd_socket)); - } - - return _winbindd_socket; -} - -int open_winbindd_priv_socket(void) -{ - if (_winbindd_priv_socket == -1) { - _winbindd_priv_socket = create_pipe_sock( - get_winbind_priv_pipe_dir(), WINBINDD_SOCKET_NAME, 0750); - DEBUG(10, ("open_winbindd_priv_socket: opened socket fd %d\n", - _winbindd_priv_socket)); - } - - return _winbindd_priv_socket; -} - -/* * Client list accessor functions */ |