mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s3-auth: Pass mem_ctx to do_map_to_guest_server_info().
Change-Id: If53117023e3ab37c810193edd00a81d247fdde7a Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 19 01:28:14 CET 2014 on sn-devel-104
This commit is contained in:
parent
4d792db03f
commit
79e2725f33
@ -151,10 +151,11 @@ NTSTATUS auth3_check_password(struct auth4_context *auth4_context,
|
||||
free_user_info(&mapped_user_info);
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
nt_status = do_map_to_guest_server_info(nt_status,
|
||||
&server_info,
|
||||
nt_status = do_map_to_guest_server_info(mem_ctx,
|
||||
nt_status,
|
||||
user_info->client.account_name,
|
||||
user_info->client.domain_name);
|
||||
user_info->client.domain_name,
|
||||
&server_info);
|
||||
*server_returned_info = talloc_steal(mem_ctx, server_info);
|
||||
return nt_status;
|
||||
}
|
||||
|
@ -1536,9 +1536,11 @@ bool is_trusted_domain(const char* dom_name)
|
||||
on a logon error possibly map the error to success if "map to guest"
|
||||
is set approriately
|
||||
*/
|
||||
NTSTATUS do_map_to_guest_server_info(NTSTATUS status,
|
||||
struct auth_serversupplied_info **server_info,
|
||||
const char *user, const char *domain)
|
||||
NTSTATUS do_map_to_guest_server_info(TALLOC_CTX *mem_ctx,
|
||||
NTSTATUS status,
|
||||
const char *user,
|
||||
const char *domain,
|
||||
struct auth_serversupplied_info **server_info)
|
||||
{
|
||||
user = user ? user : "";
|
||||
domain = domain ? domain : "";
|
||||
@ -1548,13 +1550,13 @@ NTSTATUS do_map_to_guest_server_info(NTSTATUS status,
|
||||
(lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD)) {
|
||||
DEBUG(3,("No such user %s [%s] - using guest account\n",
|
||||
user, domain));
|
||||
return make_server_info_guest(NULL, server_info);
|
||||
return make_server_info_guest(mem_ctx, server_info);
|
||||
}
|
||||
} else if (NT_STATUS_EQUAL(status, NT_STATUS_WRONG_PASSWORD)) {
|
||||
if (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD) {
|
||||
DEBUG(3,("Registered username %s for guest access\n",
|
||||
user));
|
||||
return make_server_info_guest(NULL, server_info);
|
||||
return make_server_info_guest(mem_ctx, server_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,9 +264,11 @@ NTSTATUS make_user_info(struct auth_usersupplied_info **ret_user_info,
|
||||
enum auth_password_state password_state);
|
||||
void free_user_info(struct auth_usersupplied_info **user_info);
|
||||
|
||||
NTSTATUS do_map_to_guest_server_info(NTSTATUS status,
|
||||
struct auth_serversupplied_info **server_info,
|
||||
const char *user, const char *domain);
|
||||
NTSTATUS do_map_to_guest_server_info(TALLOC_CTX *mem_ctx,
|
||||
NTSTATUS status,
|
||||
const char *user,
|
||||
const char *domain,
|
||||
struct auth_serversupplied_info **server_info);
|
||||
|
||||
/* The following definitions come from auth/auth_winbind.c */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user