summaryrefslogtreecommitdiff
path: root/source4/auth/auth.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-10-29 09:15:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:01 -0500
commit85796280f4e9a4f8ac6a1c327c13c7dbef9ce424 (patch)
treeefa09f459b67d9cdebfaeaf5480e9745a70c857f /source4/auth/auth.c
parent09d0b152b7bd85aa01898af81bd166a7673ab886 (diff)
downloadsamba-85796280f4e9a4f8ac6a1c327c13c7dbef9ce424.tar.gz
samba-85796280f4e9a4f8ac6a1c327c13c7dbef9ce424.tar.bz2
samba-85796280f4e9a4f8ac6a1c327c13c7dbef9ce424.zip
r3361: Allow Samba4 (I'm interested in ntlm_auth in particular) to use
Samba3's winbind. This is also the start of domain membership code in Samba4, as we now (partially) parse the info3, and use it like Samba3 does. Andrew Bartlett (This used to be commit c1b7303c1c7d9fb815006c3bd2af20a0010d15a8)
Diffstat (limited to 'source4/auth/auth.c')
-rw-r--r--source4/auth/auth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c
index 62e2b93ecb..23dae12811 100644
--- a/source4/auth/auth.c
+++ b/source4/auth/auth.c
@@ -154,6 +154,7 @@ static BOOL check_domain_match(const char *user, const char *domain)
static NTSTATUS check_ntlm_password(struct auth_context *auth_context,
const struct auth_usersupplied_info *user_info,
+ TALLOC_CTX *out_mem_ctx,
struct auth_serversupplied_info **server_info)
{
/* if all the modules say 'not for me' this is reasonable */
@@ -220,6 +221,9 @@ static NTSTATUS check_ntlm_password(struct auth_context *auth_context,
if (NT_STATUS_IS_OK(nt_status)) {
DEBUG(3, ("check_ntlm_password: %s authentication for user [%s] succeeded\n",
auth_method->name, user_info->smb_name.str));
+
+ /* Give the server info to the client to hold onto */
+ talloc_reference(out_mem_ctx, *server_info);
} else {
DEBUG(5, ("check_ntlm_password: %s authentication for user [%s] FAILED with error %s\n",
auth_method->name, user_info->smb_name.str, nt_errstr(nt_status)));