summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_builtin.c2
-rw-r--r--source3/auth/auth_util.c9
-rw-r--r--source3/smbd/sesssetup.c6
3 files changed, 9 insertions, 8 deletions
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index ffc8b94962..3741f29779 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -42,7 +42,7 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
if (!(user_info->internal_username
&& *user_info->internal_username)) {
- nt_status = make_server_info_guest(server_info);
+ nt_status = make_server_info_guest(NULL, server_info);
}
return nt_status;
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 038636f868..bb3dc78e83 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1224,9 +1224,10 @@ bool init_guest_info(void)
return NT_STATUS_IS_OK(make_new_server_info_guest(&guest_info));
}
-NTSTATUS make_server_info_guest(auth_serversupplied_info **server_info)
+NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
+ auth_serversupplied_info **server_info)
{
- *server_info = copy_serverinfo(NULL, guest_info);
+ *server_info = copy_serverinfo(mem_ctx, guest_info);
return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
}
@@ -1477,7 +1478,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
if (!NT_STATUS_IS_OK(nt_status)) {
TALLOC_FREE( sam_account );
if ( lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID ) {
- make_server_info_guest(server_info);
+ make_server_info_guest(NULL, server_info);
return NT_STATUS_OK;
}
return nt_status;
@@ -1729,7 +1730,7 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
if (!NT_STATUS_IS_OK(nt_status)) {
TALLOC_FREE( result );
if ( lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID ) {
- make_server_info_guest(server_info);
+ make_server_info_guest(NULL, server_info);
return NT_STATUS_OK;
}
return nt_status;
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 9076949a81..0f0a0d5f31 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -45,7 +45,7 @@ static NTSTATUS do_map_to_guest(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));
- status = make_server_info_guest(server_info);
+ status = make_server_info_guest(NULL, server_info);
}
}
@@ -53,7 +53,7 @@ static NTSTATUS do_map_to_guest(NTSTATUS status,
if (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD) {
DEBUG(3,("Registered username %s for guest access\n",
user));
- status = make_server_info_guest(server_info);
+ status = make_server_info_guest(NULL, server_info);
}
}
@@ -488,7 +488,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
reload_services(True);
if ( map_domainuser_to_guest ) {
- make_server_info_guest(&server_info);
+ make_server_info_guest(NULL, &server_info);
} else if (logon_info) {
/* pass the unmapped username here since map_username()
will be called again from inside make_server_info_info3() */