diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2022-12-16 12:08:41 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2023-02-08 00:03:39 +0000 |
commit | e20067c52d642123b7ed929c1e35a2c0d144b13c (patch) | |
tree | 7b0c97ed0ada07c40e068194fa9fb51217ffd241 /lib/afs/afs_funcs.c | |
parent | 5147f011d9b2b37dd46939d4b50d71d50a6776c1 (diff) | |
download | samba-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/afs_funcs.c')
-rw-r--r-- | lib/afs/afs_funcs.c | 2 |
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", |