s3-winbindd: Remove undocumented winbindd:socket dir parameter
authorAndrew Bartlett <abartlet@samba.org>
Fri, 11 Oct 2013 00:34:13 +0000 (13:34 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 14 Oct 2013 21:58:45 +0000 (10:58 +1300)
This uses the documeted "winbindd socket directory" parameter instead.

This came about due to the merge of the two smb.conf tables in s3 and
s4 for the Samba 4.0 release.  The s4 code used a real parameter,
which caused this to be documented, whereas no automatic procedure
existed to notice the parametric option and the need to document that.
The fact that this was not used consistently in both codebases is one
of the many areas of technical debt we still need to pay off here.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/target/Samba3.pm
source3/include/proto.h
source3/param/loadparm.c
source3/winbindd/winbindd.c
source3/winbindd/winbindd_proto.h

index fbbddcc926c1dec919f9f8125239b2c99ded2e19..c3a434558f7c65d9d4861874a85f39e3191aa0a2 100755 (executable)
@@ -968,7 +968,7 @@ sub provision($$$$$$)
        printing = bsd
        printcap name = /dev/null
 
-       winbindd:socket dir = $wbsockdir
+       winbindd socket directory = $wbsockdir
        nmbd:socket dir = $nmbdsockdir
        idmap config * : range = 100000-200000
        winbind enum users = yes
index 023fbd0f4a4745841d7de5fe3d54bb0fdcf54cef..9612a07f664f9f2e9e6b9f03a3a7134f45cfcbbf 100644 (file)
@@ -1060,6 +1060,7 @@ char *lp_wins_hook(TALLOC_CTX *ctx);
 const char *lp_template_homedir(void);
 const char *lp_template_shell(void);
 const char *lp_winbind_separator(void);
+const char *lp_winbindd_socket_directory(void);
 bool lp_winbind_enum_users(void);
 bool lp_winbind_enum_groups(void);
 bool lp_winbind_use_default_domain(void);
index 3daebdb61cd6fa31f92e60d9716f4cdf8d4ee521..62cba4df573e8a3887d0f0513289cc0a8d2f0d6a 100644 (file)
@@ -959,6 +959,7 @@ static void init_globals(bool reinit_globals)
        string_set(&Globals.szTemplateShell, "/bin/false");
        string_set(&Globals.szTemplateHomedir, "/home/%D/%U");
        string_set(&Globals.szWinbindSeparator, "\\");
+       string_set(&Globals.szWinbinddSocketDirectory, dyn_WINBINDD_SOCKET_DIR);
 
        string_set(&Globals.szCupsServer, "");
        string_set(&Globals.szIPrintServer, "");
index 50573ac328101c93f481200f75f36399728924b5..31280c216b86e4784e73ff6a245f40888d61fa62 100644 (file)
@@ -189,7 +189,7 @@ static void terminate(bool is_parent)
                char *path = NULL;
 
                if (asprintf(&path, "%s/%s",
-                       get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME) > 0) {
+                       lp_winbindd_socket_directory(), WINBINDD_SOCKET_NAME) > 0) {
                        unlink(path);
                        SAFE_FREE(path);
                }
@@ -1031,11 +1031,6 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev,
  * Winbindd socket accessor functions
  */
 
-const char *get_winbind_pipe_dir(void)
-{
-       return lp_parm_const_string(-1, "winbindd", "socket dir", get_dyn_WINBINDD_SOCKET_DIR());
-}
-
 char *get_winbind_priv_pipe_dir(void)
 {
        return state_path(WINBINDD_PRIV_SOCKET_SUBDIR);
@@ -1056,7 +1051,7 @@ static bool winbindd_setup_listeners(void)
 
        pub_state->privileged = false;
        pub_state->fd = create_pipe_sock(
-               get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME, 0755);
+               lp_winbindd_socket_directory(), WINBINDD_SOCKET_NAME, 0755);
        if (pub_state->fd == -1) {
                goto failed;
        }
index 3df7d7c8ca03c81fd166804594f63bcba069c454..cfc19d03ed11c81753ab07224daf7e0baa1b5120 100644 (file)
@@ -34,7 +34,6 @@ bool winbindd_setup_stdin_handler(bool parent, bool foreground);
 bool winbindd_setup_sig_hup_handler(const char *lfile);
 bool winbindd_use_idmap_cache(void);
 bool winbindd_use_cache(void);
-const char *get_winbind_pipe_dir(void);
 char *get_winbind_priv_pipe_dir(void);
 struct tevent_context *winbind_event_context(void);
 int main(int argc, char **argv, char **envp);