mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
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>
This commit is contained in:
parent
dd8aba3048
commit
8ec9e97666
@ -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++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user