diff options
author | Ralph Boehme <slow@samba.org> | 2019-05-16 12:42:29 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-06-21 07:56:17 +0000 |
commit | 71c33811c82b25e399a46fe0f12062d63be6cf3c (patch) | |
tree | 7242d2fc2aef9afc40b6f78b0bc91292df517af5 | |
parent | 29e402f583b520c25f355318b2868befac99fa9c (diff) | |
download | samba-71c33811c82b25e399a46fe0f12062d63be6cf3c.tar.gz |
s3:auth: add reinit_guest_session_info()
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)
-rw-r--r-- | source3/auth/auth_util.c | 11 | ||||
-rw-r--r-- | source3/auth/proto.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 24d1e37e9cb..fce35318b88 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -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) { diff --git a/source3/auth/proto.h b/source3/auth/proto.h index e4a6830eecb..0bec7c5daaa 100644 --- a/source3/auth/proto.h +++ b/source3/auth/proto.h @@ -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); |