s3:winbindd use common server context functions
authorSimo Sorce <idra@samba.org>
Thu, 10 Jun 2010 15:55:27 +0000 (11:55 -0400)
committerSimo Sorce <idra@samba.org>
Thu, 10 Jun 2010 21:30:45 +0000 (17:30 -0400)
source3/Makefile.in
source3/winbindd/winbindd.c
source3/winbindd/winbindd.h
source3/winbindd/winbindd_event.c [deleted file]
source3/winbindd/winbindd_proto.h

index 6445278896ede7303cf98a56d64f1c1b4e37ec6f..82e677d0e9e7da6330aa405cffba35e763c727a3 100644 (file)
@@ -1171,7 +1171,6 @@ IDMAP_ADEX_OBJ = \
 
 WINBINDD_OBJ1 = \
                winbindd/winbindd.o       \
-               winbindd/winbindd_event.o \
                winbindd/winbindd_group.o \
                winbindd/winbindd_util.o  \
                winbindd/winbindd_cache.o \
index fcd3145931b478e32cdaf88512787b9a54ec174b..87a8be64c919bc69a2758f08154a9bb5bf7c61d4 100644 (file)
@@ -37,20 +37,6 @@ static bool interactive = False;
 
 extern bool override_logfile;
 
-struct messaging_context *winbind_messaging_context(void)
-{
-       static struct messaging_context *ctx;
-
-       if (ctx == NULL) {
-               ctx = messaging_init(NULL, procid_self(),
-                                    winbind_event_context());
-       }
-       if (ctx == NULL) {
-               DEBUG(0, ("Could not init winbind messaging context.\n"));
-       }
-       return ctx;
-}
-
 /* Reload configuration */
 
 static bool reload_services_file(const char *lfile)
index b8835c0b0ba38ea3eb99bab00166ebabbcdac861..91ebb6a7a9b041b82ebd41a3673f5fff57121348 100644 (file)
@@ -385,4 +385,7 @@ struct WINBINDD_CCACHE_ENTRY {
 #define WINBINDD_PAM_AUTH_KRB5_RENEW_TIME 2592000 /* one month */
 #define DOM_SEQUENCE_NONE ((uint32)-1)
 
+#define winbind_event_context server_event_context
+#define winbind_messaging_context server_messaging_context
+
 #endif /* _WINBINDD_H */
diff --git a/source3/winbindd/winbindd_event.c b/source3/winbindd/winbindd_event.c
deleted file mode 100644 (file)
index b6e8353..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   Winbind daemon for ntdom nss module
-
-   Copyright (C) by Tim Potter 2000-2002
-   Copyright (C) Andrew Tridgell 2002
-   Copyright (C) Jelmer Vernooij 2003
-   Copyright (C) Volker Lendecke 2004
-   Copyright (C) Andrew Bartlett 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "winbindd.h"
-
-struct event_context *winbind_event_context(void)
-{
-       static struct event_context *winbindd_event_ctx;
-       if (!winbindd_event_ctx && !(winbindd_event_ctx = event_context_init(NULL))) {
-               smb_panic("Could not init winbind event context");
-       }
-       return winbindd_event_ctx;
-}
-
index 49e66f22c8e62af439eec78c95d32058a6a910d0..caa1cac0eff5fde788e8e15d7a658df24785f987 100644 (file)
@@ -40,9 +40,6 @@ void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token);
 void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
                           int n_groups, gid_t *groups);
 
-/* The following definitions come from winbindd/winbindd_event.c  */
-struct event_context *winbind_event_context(void);
-
 /* The following definitions come from winbindd/winbindd.c  */
 struct messaging_context *winbind_messaging_context(void);
 void request_error(struct winbindd_cli_state *state);