summaryrefslogtreecommitdiff
path: root/source3/auth/auth_util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-18 13:55:20 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:14 +1000
commit52b28ec813ff3696606fc8f3a6bf4759a1a104e5 (patch)
treeac253be07d5e7b58ab9b67414ac75f74d4d3fee0 /source3/auth/auth_util.c
parent03b153ce54fdae77694577f33453a19928225d00 (diff)
downloadsamba-52b28ec813ff3696606fc8f3a6bf4759a1a104e5.tar.gz
samba-52b28ec813ff3696606fc8f3a6bf4759a1a104e5.tar.bz2
samba-52b28ec813ff3696606fc8f3a6bf4759a1a104e5.zip
auth: Split out make_user_info_SamBaseInfo and add authenticated argument
This will allow the source3 auth code to call this without needing to double-parse the SIDs Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r--source3/auth/auth_util.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 0ef7df88b3..0627911aeb 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -465,8 +465,6 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
struct dom_sid tmp_sid;
struct auth_session_info *session_info;
struct wbcUnixId *ids;
- struct auth_user_info_dc *user_info_dc;
- union netr_Validation val;
/* Ensure we can't possible take a code path leading to a
* null defref. */
@@ -547,22 +545,16 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- val.sam3 = server_info->info3;
-
- /* Convert into something we can build a struct
- * auth_session_info from. Most of the work here
- * will be to convert the SIDS, which we will then ignore, but
- * this is the easier way to handle it */
- status = make_user_info_dc_netlogon_validation(talloc_tos(), "", 3, &val, &user_info_dc);
+ /* 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 user_info_dc failed!\n"));
+ DEBUG(0, ("conversion of info3 into auth_user_info failed!\n"));
TALLOC_FREE(session_info);
return status;
}
- session_info->info = talloc_move(session_info, &user_info_dc->info);
- talloc_free(user_info_dc);
-
/*
* 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