summaryrefslogtreecommitdiff
path: root/source3/nsswitch/wbinfo.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-13 21:28:31 +0000
committerJeremy Allison <jra@samba.org>2001-11-13 21:28:31 +0000
commitc51f7bd4d0fea33a841e56cdf1fb727a38014c58 (patch)
tree872bb3d5c8071ca345213b09d06be301d05a1af1 /source3/nsswitch/wbinfo.c
parent0675d01a11d0e99519f85e074791832c73615e7a (diff)
downloadsamba-c51f7bd4d0fea33a841e56cdf1fb727a38014c58.tar.gz
samba-c51f7bd4d0fea33a841e56cdf1fb727a38014c58.tar.bz2
samba-c51f7bd4d0fea33a841e56cdf1fb727a38014c58.zip
Fix winbind client code so that winbind calls are not made if the
requested name does not have a winbind separator character. This makes the intent explicit. Tim, contact me if this is not what you indended. Jeremy. (This used to be commit 86b7cf7f85840316052ff29115bf55c04dc17486)
Diffstat (limited to 'source3/nsswitch/wbinfo.c')
-rw-r--r--source3/nsswitch/wbinfo.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index d29b144147..d154615db6 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -244,6 +244,13 @@ static BOOL wbinfo_lookupname(char *name)
struct winbindd_request request;
struct winbindd_response response;
+ /*
+ * Don't do the lookup if the name has no separator.
+ */
+
+ if (!strchr(name, *lp_winbind_separator()))
+ return False;
+
/* Send off request */
ZERO_STRUCT(request);
@@ -271,6 +278,13 @@ static BOOL wbinfo_auth(char *username)
NSS_STATUS result;
char *p;
+ /*
+ * Don't do the lookup if the name has no separator.
+ */
+
+ if (!strchr(username, *lp_winbind_separator()))
+ return False;
+
/* Send off request */
ZERO_STRUCT(request);
@@ -306,6 +320,13 @@ static BOOL wbinfo_auth_crap(char *username)
fstring pass;
char *p;
+ /*
+ * Don't do the lookup if the name has no separator.
+ */
+
+ if (!strchr(username, *lp_winbind_separator()))
+ return False;
+
/* Send off request */
ZERO_STRUCT(request);