diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2025-08-28 16:27:30 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2025-09-17 12:16:05 +0000 |
| commit | b1326edddb302a28fc9418ab60df6210513cc07c (patch) | |
| tree | 923874308849c1724e46161fff2c71564fb5a887 | |
| parent | b7a87d7c0dd19016e82f5d33f2c5ec90479c31fe (diff) | |
linux: setgroups16(): Pre-extend the groups array
For the size we know we will need in the end.
No functional change (intended).
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52279
| -rw-r--r-- | sys/compat/linux/linux_uid16.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index dd681f971746..8ac093e004d0 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -102,6 +102,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) } newcred = crget(); + crextend(newcred, ngrp); p = td->td_proc; PROC_LOCK(p); oldcred = crcopysafe(p, newcred); |
