diff options
author | Volker Lendecke <vl@samba.org> | 2019-11-02 13:56:49 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-11-06 20:36:34 +0000 |
commit | 8ec9e97666653469e5bd56ef0576fb0af1406a82 (patch) | |
tree | 713c4e4a0e0a4c396b2869ce600124239c075889 /source4 | |
parent | dd8aba30483649ea28199241fbc2410b1b4595a5 (diff) | |
download | samba-8ec9e97666653469e5bd56ef0576fb0af1406a82.tar.gz |
auth: Simplify session generation
We don't need to parse a text sid, we have those as binary available
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/session.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/source4/auth/session.c b/source4/auth/session.c index 71d236aa3e1..c5fc226a7d7 100644 --- a/source4/auth/session.c +++ b/source4/auth/session.c @@ -135,16 +135,10 @@ _PUBLIC_ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - if (!dom_sid_parse(SID_WORLD, &sids[num_sids])) { - TALLOC_FREE(tmp_ctx); - return NT_STATUS_INTERNAL_ERROR; - } + sid_copy(&sids[num_sids], &global_sid_World); num_sids++; - if (!dom_sid_parse(SID_NT_NETWORK, &sids[num_sids])) { - TALLOC_FREE(tmp_ctx); - return NT_STATUS_INTERNAL_ERROR; - } + sid_copy(&sids[num_sids], &global_sid_Network); num_sids++; } @@ -155,10 +149,7 @@ _PUBLIC_ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - if (!dom_sid_parse(SID_NT_AUTHENTICATED_USERS, &sids[num_sids])) { - TALLOC_FREE(tmp_ctx); - return NT_STATUS_INTERNAL_ERROR; - } + sid_copy(&sids[num_sids], &global_sid_Authenticated_Users); num_sids++; } |