]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:auth: add reinit_guest_session_info()
authorRalph Boehme <slow@samba.org>
Thu, 16 May 2019 10:42:29 +0000 (12:42 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Jun 2019 07:56:17 +0000 (07:56 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13944

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8096cc7eb2b36b074ff17a52dc3540be4ecff6bb)

source3/auth/auth_util.c
source3/auth/proto.h

index 24d1e37e9cb3e8069500069abecf39516a503f5a..fce35318b8896a40ac2d262f3a5e4a93cce9b6f3 100644 (file)
@@ -1756,6 +1756,17 @@ bool init_guest_session_info(TALLOC_CTX *mem_ctx)
        return true;
 }
 
+bool reinit_guest_session_info(TALLOC_CTX *mem_ctx)
+{
+       TALLOC_FREE(guest_info);
+       TALLOC_FREE(guest_server_info);
+       TALLOC_FREE(anonymous_info);
+
+       DBG_DEBUG("Reinitialing guest info\n");
+
+       return init_guest_session_info(mem_ctx);
+}
+
 NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
                                struct auth_serversupplied_info **server_info)
 {
index e4a6830eecbaca318e4b4868df0feec8687d1a56..0bec7c5daaa07e66b9de351e191cbe1db12d29c0 100644 (file)
@@ -273,6 +273,7 @@ NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
 struct auth_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
                                             const struct auth_session_info *src);
 bool init_guest_session_info(TALLOC_CTX *mem_ctx);
+bool reinit_guest_session_info(TALLOC_CTX *mem_ctx);
 NTSTATUS init_system_session_info(TALLOC_CTX *mem_ctx);
 bool session_info_set_session_key(struct auth_session_info *info,
                                 DATA_BLOB session_key);