summaryrefslogtreecommitdiff
path: root/lib/afs
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 /lib/afs
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 'lib/afs')
-rw-r--r--lib/afs/afs_funcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/afs/afs_funcs.c b/lib/afs/afs_funcs.c
index c7b263c7e73..4360f54827a 100644
--- a/lib/afs/afs_funcs.c
+++ b/lib/afs/afs_funcs.c
@@ -252,7 +252,7 @@ bool afs_login(connection_struct *conn)
return false;
}
- user_sid = &conn->session_info->security_token->sids[0];
+ user_sid = &conn->session_info->security_token->sids[PRIMARY_USER_SID_INDEX];
afs_username = talloc_string_sub(talloc_tos(),
afs_username,
"%s",