From 5e90405af923de62b356de22871d967d9846c5a2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 27 Apr 2011 16:45:39 +1000 Subject: s3-winbind Use get_dyn_WINBINDD_SOCKET_DIR() to get the winbind pipe dir This ensures we follow the dynconfig convention for the socket directory, and makes it easier to ensure that the client and server both refer to the same socket. Andrew Bartlett --- source3/winbindd/winbindd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index c5a124a628f..033c436c88b 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -940,7 +940,7 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev, const char *get_winbind_pipe_dir(void) { - return lp_parm_const_string(-1, "winbindd", "socket dir", WINBINDD_SOCKET_DIR); + return lp_parm_const_string(-1, "winbindd", "socket dir", get_dyn_WINBINDD_SOCKET_DIR()); } char *get_winbind_priv_pipe_dir(void) -- cgit From 0757688eb34ec1a22bf8c28f72416d6684756647 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 28 Apr 2011 13:26:57 +0200 Subject: s3: In winbind, close parent/child sockets This should further reduce fd load in winbind children --- source3/winbindd/winbindd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 033c436c88b..232f9b4c60f 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -404,7 +404,7 @@ static void winbind_msg_validate_cache(struct messaging_context *msg_ctx, /* child */ - if (!winbindd_reinit_after_fork(NULL)) { + if (!winbindd_reinit_after_fork(NULL, NULL)) { _exit(0); } -- cgit From aa5abcaf7e2844e3bd3d8e8fe26488673ad3c00e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 29 Apr 2011 12:53:13 +0200 Subject: s3: Make winbindd_reinit_after_fork return NTSTATUS --- source3/winbindd/winbindd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 232f9b4c60f..071b3ccdc94 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -378,6 +378,7 @@ static void winbind_msg_validate_cache(struct messaging_context *msg_ctx, { uint8 ret; pid_t child_pid; + NTSTATUS status; DEBUG(10, ("winbindd_msg_validate_cache: got validate-cache " "message.\n")); @@ -404,7 +405,10 @@ static void winbind_msg_validate_cache(struct messaging_context *msg_ctx, /* child */ - if (!winbindd_reinit_after_fork(NULL, NULL)) { + status = winbindd_reinit_after_fork(NULL, NULL); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(1, ("winbindd_reinit_after_fork failed: %s\n", + nt_errstr(status))); _exit(0); } -- cgit From 0e76eddcc8a4e7e98167b8f92387fae015fae095 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 May 2011 13:21:53 +0200 Subject: s3: include ntdomain.h before including generated srv_ headers. Guenther --- source3/winbindd/winbindd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 071b3ccdc94..677f7661828 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -27,6 +27,7 @@ #include "winbindd.h" #include "nsswitch/winbind_client.h" #include "nsswitch/wb_reqtrans.h" +#include "ntdomain.h" #include "../librpc/gen_ndr/srv_lsa.h" #include "../librpc/gen_ndr/srv_samr.h" #include "secrets.h" -- cgit From 5a6368f1e2a4348fdcdc062b2546eb45bf943aed Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 5 Jun 2011 11:30:43 +0200 Subject: s3:winbind: Convert WINBINDD_WINS_BYIP to the async API --- source3/winbindd/winbindd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 677f7661828..8c6d91e6282 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -453,7 +453,6 @@ static struct winbindd_dispatch_table { /* WINS functions */ { WINBINDD_WINS_BYNAME, winbindd_wins_byname, "WINS_BYNAME" }, - { WINBINDD_WINS_BYIP, winbindd_wins_byip, "WINS_BYIP" }, /* End of list */ @@ -545,6 +544,8 @@ static struct winbindd_async_dispatch_table async_nonpriv_table[] = { { WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP, "PAM_CHNG_PSWD_AUTH_CRAP", winbindd_pam_chng_pswd_auth_crap_send, winbindd_pam_chng_pswd_auth_crap_recv }, + { WINBINDD_WINS_BYIP, "PING", + winbindd_wins_byip_send, winbindd_wins_byip_recv }, { 0, NULL, NULL, NULL } }; -- cgit From ad0a07c531fadd1639c5298951cfaf5cfe0cb10e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Jun 2011 11:44:43 +1000 Subject: s3-talloc Change TALLOC_ZERO_P() to talloc_zero() Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc. --- source3/winbindd/winbindd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 8c6d91e6282..3d29e3fd51b 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -785,7 +785,7 @@ static void new_connection(int listen_sock, bool privileged) /* Create new connection structure */ - if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) { + if ((state = talloc_zero(NULL, struct winbindd_cli_state)) == NULL) { close(sock); return; } -- cgit From ee90e0103094cd0289c42cc1f25fe4960b3c436b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 20 Jun 2011 10:13:09 +1000 Subject: s3-winbind Move winbind privileged socket dir into state_path() On default installs, this will be the same as the old lock_path(), but lock_path() is now a directory that can safely be mapped to /var/locks and removed by the OS on reboot. It is important that the directory permissions of this directory be preserved, as they may be customised. Andrew Bartlett --- source3/winbindd/winbindd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 3d29e3fd51b..1646821a1f1 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -951,7 +951,7 @@ const char *get_winbind_pipe_dir(void) char *get_winbind_priv_pipe_dir(void) { - return lock_path(WINBINDD_PRIV_SOCKET_SUBDIR); + return state_path(WINBINDD_PRIV_SOCKET_SUBDIR); } static bool winbindd_setup_listeners(void) -- cgit From 994abd2dea2164bb005209b77ec2608b4a5fe4e8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 20 Jun 2011 22:18:48 +0200 Subject: s3: Fix a winbind message Autobuild-User: Volker Lendecke Autobuild-Date: Mon Jun 20 23:28:43 CEST 2011 on sn-devel-104 --- source3/winbindd/winbindd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 1646821a1f1..8cd68e52196 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -544,7 +544,7 @@ static struct winbindd_async_dispatch_table async_nonpriv_table[] = { { WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP, "PAM_CHNG_PSWD_AUTH_CRAP", winbindd_pam_chng_pswd_auth_crap_send, winbindd_pam_chng_pswd_auth_crap_recv }, - { WINBINDD_WINS_BYIP, "PING", + { WINBINDD_WINS_BYIP, "WINS_BYIP", winbindd_wins_byip_send, winbindd_wins_byip_recv }, { 0, NULL, NULL, NULL } -- cgit From 729d17e725aa1bfd306aa27728c97210c5c01d2c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 14 Jun 2011 23:51:10 +0200 Subject: s3: Convert WINBINDD_WINS_BYNAME to the async API --- source3/winbindd/winbindd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/winbindd/winbindd.c') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 8cd68e52196..469d64e41d5 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -450,10 +450,6 @@ static struct winbindd_dispatch_table { { WINBINDD_CCACHE_NTLMAUTH, winbindd_ccache_ntlm_auth, "NTLMAUTH" }, { WINBINDD_CCACHE_SAVE, winbindd_ccache_save, "CCACHE_SAVE" }, - /* WINS functions */ - - { WINBINDD_WINS_BYNAME, winbindd_wins_byname, "WINS_BYNAME" }, - /* End of list */ { WINBINDD_NUM_CMDS, NULL, "NONE" } @@ -546,6 +542,8 @@ static struct winbindd_async_dispatch_table async_nonpriv_table[] = { winbindd_pam_chng_pswd_auth_crap_recv }, { WINBINDD_WINS_BYIP, "WINS_BYIP", winbindd_wins_byip_send, winbindd_wins_byip_recv }, + { WINBINDD_WINS_BYNAME, "WINS_BYNAME", + winbindd_wins_byname_send, winbindd_wins_byname_recv }, { 0, NULL, NULL, NULL } }; -- cgit