smbd: move notify_fname() out of rmdir_internals() up to close_directory()
[samba4-gss.git] / nsswitch / winbind_client.h
blob93b5672ba04644939112aac59e9bd60e052d491a
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 NSS_STATUS winbindd_request_response(struct winbindd_context *ctx,
38 int req_type,
39 struct winbindd_request *request,
40 struct winbindd_response *response);
41 NSS_STATUS winbindd_priv_request_response(struct winbindd_context *ctx,
42 int req_type,
43 struct winbindd_request *request,
44 struct winbindd_response *response);
46 void winbind_set_client_name(const char *name);
48 #define winbind_env_set() \
49 (strcmp(getenv(WINBINDD_DONT_ENV)?getenv(WINBINDD_DONT_ENV):"0","1") == 0)
51 #define winbind_off() \
52 (setenv(WINBINDD_DONT_ENV, "1", 1) == 0)
54 #define winbind_on() \
55 (setenv(WINBINDD_DONT_ENV, "0", 1) == 0)
57 #endif /* _NSSWITCH_WINBIND_CLIENT_H_ */