summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-12-16 12:08:41 +1300
committerAndrew Bartlett <abartlet@samba.org>2023-02-08 00:03:39 +0000
commite20067c52d642123b7ed929c1e35a2c0d144b13c (patch)
tree7b0c97ed0ada07c40e068194fa9fb51217ffd241 /libcli
parent5147f011d9b2b37dd46939d4b50d71d50a6776c1 (diff)
downloadsamba-e20067c52d642123b7ed929c1e35a2c0d144b13c.tar.gz
auth: Make more liberal use of SID index constants
Arrays of SIDs are handled not fully consistently throughout the codebase. Sometimes SIDs in the first and second positions represent a user and a primary group respectively; other times they don't mean anything in particular. Using these index constants in situations of the former sort can help to clarify our intent. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/security/security_token.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcli/security/security_token.h b/libcli/security/security_token.h
index 15773df617f..8e256074b0e 100644
--- a/libcli/security/security_token.h
+++ b/libcli/security/security_token.h
@@ -28,6 +28,8 @@
#define PRIMARY_USER_SID_INDEX 0
#define PRIMARY_GROUP_SID_INDEX 1
+#define PRIMARY_SIDS_COUNT 2
+#define REMAINING_SIDS_INDEX 2
/*
return a blank security token