diff options
author | Simo Sorce <idra@samba.org> | 2010-06-10 11:55:27 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-06-10 17:30:45 -0400 |
commit | cbda0369a831ed279cec7ff231ad7399af74db39 (patch) | |
tree | 4bf54722b9011c8b6f4c20abe64ddfc40ff29e41 /source3/winbindd | |
parent | 5e576a53abbf2822c0a8fcc87f76140a755599e4 (diff) | |
download | samba-cbda0369a831ed279cec7ff231ad7399af74db39.tar.gz samba-cbda0369a831ed279cec7ff231ad7399af74db39.tar.bz2 samba-cbda0369a831ed279cec7ff231ad7399af74db39.zip |
s3:winbindd use common server context functions
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd.c | 14 | ||||
-rw-r--r-- | source3/winbindd/winbindd.h | 3 | ||||
-rw-r--r-- | source3/winbindd/winbindd_event.c | 37 | ||||
-rw-r--r-- | source3/winbindd/winbindd_proto.h | 3 |
4 files changed, 3 insertions, 54 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index fcd3145931..87a8be64c9 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -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) diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h index b8835c0b0b..91ebb6a7a9 100644 --- a/source3/winbindd/winbindd.h +++ b/source3/winbindd/winbindd.h @@ -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 index b6e835395e..0000000000 --- a/source3/winbindd/winbindd_event.c +++ /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; -} - diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index 49e66f22c8..caa1cac0ef 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -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); |