spoolss: Add NCALRPC endpoint
[Samba.git] / nsswitch / winbind_client.h
blobc0ee6c9391a3c85393586934c4abc2757e3a2e35
1 /*
2 Unix SMB/CIFS implementation.
4 winbind client common code
6 Copyright (C) Tim Potter 2000
7 Copyright (C) Andrew Tridgell 2000
8 Copyright (C) Andrew Bartlett 2002
9 Copyright (C) Matthew Newton 2015
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Lesser General Public
14 License as published by the Free Software Foundation; either
15 version 3 of the License, or (at your option) any later version.
17 This library 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 GNU
20 Library General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #ifndef _NSSWITCH_WINBIND_CLIENT_H_
27 #define _NSSWITCH_WINBIND_CLIENT_H_
29 #include "winbind_nss_config.h"
30 #include "winbind_struct_protocol.h"
32 struct winbindd_context;
34 struct winbindd_context *winbindd_ctx_create(void);
35 void winbindd_ctx_free(struct winbindd_context *ctx);
37 void winbindd_free_response(struct winbindd_response *response);
38 NSS_STATUS winbindd_request_response(struct winbindd_context *ctx,
39 int req_type,
40 struct winbindd_request *request,
41 struct winbindd_response *response);
42 NSS_STATUS winbindd_priv_request_response(struct winbindd_context *ctx,
43 int req_type,
44 struct winbindd_request *request,
45 struct winbindd_response *response);
47 void winbind_set_client_name(const char *name);
49 #define winbind_env_set() \
50 (strcmp(getenv(WINBINDD_DONT_ENV)?getenv(WINBINDD_DONT_ENV):"0","1") == 0)
52 #define winbind_off() \
53 (setenv(WINBINDD_DONT_ENV, "1", 1) == 0)
55 #define winbind_on() \
56 (setenv(WINBINDD_DONT_ENV, "0", 1) == 0)
58 #endif /* _NSSWITCH_WINBIND_CLIENT_H_ */