b6e835395e52b849e6d8f8f2e1b7cffbe0bf4071
[samba.git] / source3 / winbindd / winbindd_event.c
1 /*
2    Unix SMB/CIFS implementation.
3
4    Winbind daemon for ntdom nss module
5
6    Copyright (C) by Tim Potter 2000-2002
7    Copyright (C) Andrew Tridgell 2002
8    Copyright (C) Jelmer Vernooij 2003
9    Copyright (C) Volker Lendecke 2004
10    Copyright (C) Andrew Bartlett 2010
11
12    This program is free software; you can redistribute it and/or modify
13    it under the terms of the GNU General Public License as published by
14    the Free Software Foundation; either version 3 of the License, or
15    (at your option) any later version.
16
17    This program is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20    GNU General Public License for more details.
21
22    You should have received a copy of the GNU General Public License
23    along with this program.  If not, see <http://www.gnu.org/licenses/>.
24 */
25
26 #include "includes.h"
27 #include "winbindd.h"
28
29 struct event_context *winbind_event_context(void)
30 {
31         static struct event_context *winbindd_event_ctx;
32         if (!winbindd_event_ctx && !(winbindd_event_ctx = event_context_init(NULL))) {
33                 smb_panic("Could not init winbind event context");
34         }
35         return winbindd_event_ctx;
36 }
37