From c51f7bd4d0fea33a841e56cdf1fb727a38014c58 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 13 Nov 2001 21:28:31 +0000 Subject: 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) --- source3/nsswitch/wbinfo.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3/nsswitch/wbinfo.c') 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); -- cgit