summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-27 11:49:11 +0200
committerVolker Lendecke <vl@samba.org>2009-09-28 17:54:20 +0200
commitdef5bf57c550862196528515cbedc8bbc79db59a (patch)
tree08fe8b3cb74d06e8d29ca850eaf74faff039ec64 /source3
parent93db77adcb140d2510af07dab5002709dd14549f (diff)
downloadsamba-def5bf57c550862196528515cbedc8bbc79db59a.tar.gz
samba-def5bf57c550862196528515cbedc8bbc79db59a.tar.bz2
samba-def5bf57c550862196528515cbedc8bbc79db59a.zip
s3:winbind: Sanitize the args for find_auth_domain: It only needs the flags
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_ccache_access.c2
-rw-r--r--source3/winbindd/winbindd_pam.c13
-rw-r--r--source3/winbindd/winbindd_proto.h4
3 files changed, 10 insertions, 9 deletions
diff --git a/source3/winbindd/winbindd_ccache_access.c b/source3/winbindd/winbindd_ccache_access.c
index ffb20ac6c4..86017e2215 100644
--- a/source3/winbindd/winbindd_ccache_access.c
+++ b/source3/winbindd/winbindd_ccache_access.c
@@ -169,7 +169,7 @@ void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state)
return;
}
- domain = find_auth_domain(state, name_domain);
+ domain = find_auth_domain(state->request->flags, name_domain);
if (domain == NULL) {
DEBUG(5,("winbindd_ccache_ntlm_auth: can't get domain [%s]\n",
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index e28075bd80..b379e2c7a9 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -328,8 +328,8 @@ static NTSTATUS check_info3_in_group(TALLOC_CTX *mem_ctx,
return NT_STATUS_LOGON_FAILURE;
}
-struct winbindd_domain *find_auth_domain(struct winbindd_cli_state *state,
- const char *domain_name)
+struct winbindd_domain *find_auth_domain(uint8_t flags,
+ const char *domain_name)
{
struct winbindd_domain *domain;
@@ -351,7 +351,7 @@ struct winbindd_domain *find_auth_domain(struct winbindd_cli_state *state,
}
/* we can auth against trusted domains */
- if (state->request->flags & WBFLAG_PAM_CONTACT_TRUSTDOM) {
+ if (flags & WBFLAG_PAM_CONTACT_TRUSTDOM) {
domain = find_domain_from_name_noinit(domain_name);
if (domain == NULL) {
DEBUG(3, ("Authentication for domain [%s] skipped "
@@ -835,7 +835,7 @@ void winbindd_pam_auth(struct winbindd_cli_state *state)
goto done;
}
- domain = find_auth_domain(state, name_domain);
+ domain = find_auth_domain(state->request->flags, name_domain);
if (domain == NULL) {
result = NT_STATUS_NO_SUCH_USER;
@@ -1764,7 +1764,7 @@ void winbindd_pam_auth_crap(struct winbindd_cli_state *state)
}
if (domain_name != NULL)
- domain = find_auth_domain(state, domain_name);
+ domain = find_auth_domain(state->request->flags, domain_name);
if (domain != NULL) {
sendto_domain(state, domain);
@@ -2224,7 +2224,8 @@ void winbindd_pam_logoff(struct winbindd_cli_state *state)
goto failed;
}
- if ((domain = find_auth_domain(state, name_domain)) == NULL) {
+ if ((domain = find_auth_domain(state->request->flags,
+ name_domain)) == NULL) {
goto failed;
}
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index d7f5761bcf..cf8a9a3fb2 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -494,8 +494,8 @@ void ndr_print_winbindd_domain(struct ndr_print *ndr,
/* The following definitions come from winbindd/winbindd_pam.c */
-struct winbindd_domain *find_auth_domain(struct winbindd_cli_state *state,
- const char *domain_name);
+struct winbindd_domain *find_auth_domain(uint8_t flags,
+ const char *domain_name);
NTSTATUS append_auth_data(struct winbindd_cli_state *state,
struct netr_SamInfo3 *info3,
const char *name_domain,