Fix bug 8196 - Many (newer) header files don't have copyright / GPL header comments.
[obnox/samba-ctdb.git] / nsswitch / winbind_client.h
1 #ifndef __NSSWITCH_WINBIND_CLIENT_H__
2 #define __NSSWITCH_WINBIND_CLIENT_H__
3 /*
4    Unix SMB/CIFS implementation.
5
6    (C) 2011 Samba Team.
7
8    This library is free software; you can redistribute it and/or
9    modify it under the terms of the GNU Lesser General Public
10    License as published by the Free Software Foundation; either
11    version 3 of the License, or (at your option) any later version.
12
13    This library is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    Library General Public License for more details.
17
18    You should have received a copy of the GNU Lesser General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #include "winbind_nss_config.h"
23 #include "winbind_struct_protocol.h"
24
25 void winbindd_free_response(struct winbindd_response *response);
26 NSS_STATUS winbindd_send_request(int req_type, int need_priv,
27                                  struct winbindd_request *request);
28 NSS_STATUS winbindd_get_response(struct winbindd_response *response);
29 NSS_STATUS winbindd_request_response(int req_type,
30                             struct winbindd_request *request,
31                             struct winbindd_response *response);
32 NSS_STATUS winbindd_priv_request_response(int req_type,
33                                           struct winbindd_request *request,
34                                           struct winbindd_response *response);
35 #define winbind_env_set() \
36         (strcmp(getenv(WINBINDD_DONT_ENV)?getenv(WINBINDD_DONT_ENV):"0","1") == 0)
37
38 #define winbind_off() \
39         (setenv(WINBINDD_DONT_ENV, "1", 1) == 0)
40
41 #define winbind_on() \
42         (setenv(WINBINDD_DONT_ENV, "0", 1) == 0)
43 #endif