summaryrefslogtreecommitdiffstats
path: root/source/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-30 16:18:29 +0000
committerGerald Carter <jerry@samba.org>2003-06-30 16:18:29 +0000
commit11eccaef1dc61d80a7db8d0fb4bc5a47d71a4390 (patch)
treead5ef91442357a47177f3e04613d407d88962c11 /source/nsswitch
parent21d330af107f744af9569b5577afc6e7ba6a269c (diff)
downloadsamba-11eccaef1dc61d80a7db8d0fb4bc5a47d71a4390.tar.gz
samba-11eccaef1dc61d80a7db8d0fb4bc5a47d71a4390.tar.xz
samba-11eccaef1dc61d80a7db8d0fb4bc5a47d71a4390.zip
fix for platforms that don't have unsetenv().
we now have to check the value for _NO_WINBINDD. "1" enables, and != "1" disables (use "0" by convention).
Diffstat (limited to 'source/nsswitch')
-rw-r--r--source/nsswitch/wb_common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c
index ac1ccb217ed..adcfdaa9d8a 100644
--- a/source/nsswitch/wb_common.c
+++ b/source/nsswitch/wb_common.c
@@ -395,11 +395,15 @@ int read_reply(struct winbindd_response *response)
NSS_STATUS winbindd_send_request(int req_type, struct winbindd_request *request)
{
struct winbindd_request lrequest;
-
+ char *env;
+ int value;
+
/* Check for our tricky environment variable */
- if (getenv(WINBINDD_DONT_ENV)) {
- return NSS_STATUS_NOTFOUND;
+ if ( (env = getenv(WINBINDD_DONT_ENV)) != NULL ) {
+ value = atoi(env);
+ if ( value == 1 )
+ return NSS_STATUS_NOTFOUND;
}
if (!request) {