s3:auth: add reinit_guest_session_info()
authorRalph Boehme <slow@samba.org>
Thu, 16 May 2019 10:42:29 +0000 (12:42 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Jun 2019 15:40:23 +0000 (15:40 +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>
source3/auth/auth_util.c
source3/auth/proto.h

index 7f80055fda88216ef9101f44222b3b866c26b28c..5a456c1cc53f9997e78391271cbf970900bc7f33 100644 (file)
@@ -1721,6 +1721,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 a96ff6e2582abd03b067a3d8b808679afff1504d..575a3a147cb988a6f8063db6b86ef857f2a49e02 100644 (file)
@@ -271,6 +271,7 @@ NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
                                         bool is_guest,
                                         struct auth_session_info **session_info);
 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);