summaryrefslogtreecommitdiff
path: root/libcli/security/security_token.c
AgeCommit message (Collapse)AuthorFilesLines
2025-02-27libcli: avoid work in security token debug no-opVolker Lendecke1-2/+7
When the debug level is too low to print, we don't need to allocate the strings. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15737 Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-12-17libcli: Use ndr_deepcopy_struct() in security_token_duplicate()Volker Lendecke1-27/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2023-10-10libcli: Make security_token_debug() use just one DEBUG statementVolker Lendecke1-11/+18
This avoids messing up the debug logs when multiple processes are writing into the same file. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-10-10libcli: Convert security_token_debug_privileges() to talloc_asprintfVolker Lendecke1-1/+7
Reduces the number of DEBUGADD calls which leads to messed debug logs between processes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-09-26libcli/security: Rename dup_nt_token() -> security_token_duplicate()Andrew Bartlett1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-09-26libcli/security: Move dup_nt_token() to libcli/securityAndrew Bartlett1-0/+56
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-09-26libcli/security: Pass in claims evaluation state when building any security ↵Andrew Bartlett1-1/+6
token Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-08-08libcli/security: Remove unnecessary castJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-08libcli/security: Use portable format specifiersJoseph Sutton1-3/+3
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-16libcli: Simplify security_token_is_sid()Volker Lendecke1-4/+4
Avoid an explicit if-statement. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-05-16libcli: Add security_token_count_flag_sids()Volker Lendecke1-0/+37
To be used in a few places when checking special-case Samba SIDs. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15361 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2023-03-09libcli/security: Avoid includes.hVolker Lendecke1-1/+2
Don't rebuild libcli/security when not necessary Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-10-08libcli: Remove unused security_token_has_sid_string()Volker Lendecke1-14/+0
This should have been removed in ef990008f22, I just was not aware it's there... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-09-24libcli: Remove unused security_token_is_sid_string()Volker Lendecke1-14/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-02libcli: Don't leave a pointer uninitializedVolker Lendecke1-4/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-02libcli: Remove a pointless if-expressionVolker Lendecke1-3/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-30libcli: simplify an if conditionRalph Boehme1-1/+4
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-01-03lib: Remove an unused variable from security_token_debug()Volker Lendecke1-8/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2018-11-27libcli: Use dom_sid_str_bufVolker Lendecke1-2/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-04-28libcli/security: implement SECURITY_GUESTStefan Metzmacher1-0/+5
SECURITY_GUEST is not exactly the same as SECURITY_ANONYMOUS. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11847 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2014-05-27libcli: Avoid a talloc/freeVolker Lendecke1-4/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-05-27libcli: Avoid a talloc/freeVolker Lendecke1-4/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2010-10-14libcli/security Use static SIDs rather than parsing from stringsAndrew Bartlett1-5/+5
This should make the security_token_is_*() calls a little faster. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-12libcli/security Add debug class to security_token_debug() et alAndrew Bartlett1-5/+5
This will allow it to replace functions in source3 that use debug classes. Andrew Bartlett
2010-10-12libcli/security Move most of security_token.c to common code.Andrew Bartlett1-0/+142
The source4-specific session_info functions have been left in session.c Andrew Bartlett