git: 9a7c512a6149 - main - ucred groups: restore a useful comment
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 15 Aug 2025 20:36:20 UTC
The branch main has been updated by vangyzen:
URL: https://cgit.FreeBSD.org/src/commit/?id=9a7c512a614993333beec4e2d509290b0c00dde6
commit 9a7c512a614993333beec4e2d509290b0c00dde6
Author: Eric van Gyzen <vangyzen@FreeBSD.org>
AuthorDate: 2025-08-15 13:16:58 +0000
Commit: Eric van Gyzen <vangyzen@FreeBSD.org>
CommitDate: 2025-08-15 13:29:18 +0000
ucred groups: restore a useful comment
The most useful comments are those that explain _why_.
Restore such an explanation dropped by commit 6d2efbb34fd.
Reviewed by: kevans
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D51918
---
sys/kern/kern_prot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index dac0e40b0599..0ca42d640767 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2921,7 +2921,8 @@ crextend(struct ucred *cr, int n)
* Normalizes a set of groups to be applied to a 'struct ucred'.
*
* Normalization ensures that the supplementary groups are sorted in ascending
- * order and do not contain duplicates.
+ * order and do not contain duplicates. This allows group_is_supplementary
+ * to do a binary search.
*/
static void
groups_normalize(int *ngrp, gid_t *groups)