1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-21 07:15:49 +00:00
freebsd/sys/security
Olivier Certner abd39811cd
cred: kern_setgroups(): Internally use int as number of groups' type
sys_setgroups() (and sys_getgroups()) was changed in commit "kern: fail
getgroup and setgroup with negative int" (4bc2174a1b) to take the
number of groups as an 'int' (for sys_getgroups(), POSIX mandates this
change; for sys_setgroups(), which it does not standardize, it's
arguably for consistency).

All our internal APIs related to groups on 'struct ucred', as well as
related members on the latter, treat that number as an 'int' as well
(and not a 'u_int').

Consequently, to avoid surprises, change kern_setgroups() to behave the
same, and fix audit_arg_groupset() accordingly.  With that change,
everything is handled with signed integers internally.

Update sanity checks accordingly.

Reviewed by:    mhorne
Approved by:    markj (mentor)
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D46912
2024-11-02 21:37:41 +01:00
..
audit cred: kern_setgroups(): Internally use int as number of groups' type 2024-11-02 21:37:41 +01:00
mac MAC: improve handling of listening sockets 2024-09-26 08:06:24 +02:00
mac_biba cr_canseejailproc(): New privilege, no direct check for UID 0 2023-09-28 11:42:22 -03:00
mac_bsdextended sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_ddb mac_ddb: Fix the show rman validator. 2022-08-12 10:20:05 -07:00
mac_do mac_do(4): Enhance GID rule validation to check all groups in cr_groups 2024-10-29 02:58:12 +08:00
mac_grantbylabel procfs require PRIV_PROC_MEM_WRITE to write mem 2024-09-19 13:10:27 -07:00
mac_ifoff sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_ipacl mac_ipacl: Use IfAPI 2023-08-25 12:50:39 -04:00
mac_lomac cr_canseejailproc(): New privilege, no direct check for UID 0 2023-09-28 11:42:22 -03:00
mac_mls sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_none sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_ntpd sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_partition sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_pimd sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_portacl sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_priority Thread creation privilege for realtime group 2021-12-15 00:01:58 +02:00
mac_seeotheruids sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_stub sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_test sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_veriexec procfs require PRIV_PROC_MEM_WRITE to write mem 2024-09-19 13:10:27 -07:00
mac_veriexec_parser mac_veriexec_parser: Fix open_file error handling 2024-09-20 09:22:56 -06:00