summaryrefslogtreecommitdiff
path: root/source3/auth/auth_util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-12-21 17:26:23 +1100
committerStefan Metzmacher <metze@samba.org>2011-12-22 15:51:09 +0100
commite34989eeb261627115d49dd760f7db92ffc96abe (patch)
tree5095105900aa3d4d6752495c3791beff27a5252e /source3/auth/auth_util.c
parent4ecac6067f6637b160f3beff775c43118e6b684a (diff)
downloadsamba-e34989eeb261627115d49dd760f7db92ffc96abe.tar.gz
samba-e34989eeb261627115d49dd760f7db92ffc96abe.tar.bz2
samba-e34989eeb261627115d49dd760f7db92ffc96abe.zip
s3-auth Restore shortcut for guest security token
This was lost when the server_info and session_info structures were split. This helps avoid doing lookups for the guest account to determine the uid/gid and SID values. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Dec 22 15:51:09 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r--source3/auth/auth_util.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index fcfed834e5..4c9ebc01c8 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -520,7 +520,17 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
server_info->session_key.length);
}
- if (session_info->security_token) {
+ /* We need to populate session_info->info with the information found in server_info->info3 */
+ status = make_user_info_SamBaseInfo(session_info, "", &server_info->info3->base,
+ server_info->guest == false,
+ &session_info->info);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("conversion of info3 into auth_user_info failed!\n"));
+ TALLOC_FREE(session_info);
+ return status;
+ }
+
+ if (server_info->security_token) {
/* Just copy the token, it has already been finalised
* (nasty hack to support a cached guest session_info,
* and a possible strategy for auth_samba4 to pass in
@@ -545,16 +555,6 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- /* We need to populate session_info->info with the information found in server_info->info3 */
- status = make_user_info_SamBaseInfo(session_info, "", &server_info->info3->base,
- server_info->guest == false,
- &session_info->info);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("conversion of info3 into auth_user_info failed!\n"));
- TALLOC_FREE(session_info);
- return status;
- }
-
/*
* If winbind is not around, we can not make much use of the SIDs the
* domain controller provided us with. Likewise if the user name was