#
99e5a700 |
| 01-Feb-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
sysent: regen for deletion of gssd_syscall and new ABI for rpctls_syscall
|
Revision tags: release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0 |
|
#
ddb3eb4e |
| 18-Jul-2024 |
Olivier Certner <olce@FreeBSD.org> |
New setcred() system call and associated MAC hooks
This new system call allows to set all necessary credentials of a process in one go: Effective, real and saved UIDs, effective, real and saved GIDs
New setcred() system call and associated MAC hooks
This new system call allows to set all necessary credentials of a process in one go: Effective, real and saved UIDs, effective, real and saved GIDs, supplementary groups and the MAC label. Its advantage over standard credential-setting system calls (such as setuid(), seteuid(), etc.) is that it enables MAC modules, such as MAC/do, to restrict the set of credentials some process may gain in a fine-grained manner.
Traditionally, credential changes rely on setuid binaries that call multiple credential system calls and in a specific order (setuid() must be last, so as to remain root for all other credential-setting calls, which would otherwise fail with insufficient privileges). This piecewise approach causes the process to transiently hold credentials that are neither the original nor the final ones. For the kernel to enforce that only certain transitions of credentials are allowed, either these possibly non-compliant transient states have to disappear (by setting all relevant attributes in one go), or the kernel must delay setting or checking the new credentials. Delaying setting credentials could be done, e.g., by having some mode where the standard system calls contribute to building new credentials but without committing them. It could be started and ended by a special system call. Delaying checking could mean that, e.g., the kernel only verifies the credentials transition at the next non-credential-setting system call (we just mention this possibility for completeness, but are certainly not endorsing it).
We chose the simpler approach of a new system call, as we don't expect the set of credentials one can set to change often. It has the advantages that the traditional system calls' code doesn't have to be changed and that we can establish a special MAC protocol for it, by having some cleanup function called just before returning (this is a requirement for MAC/do), without disturbing the existing ones.
The mac_cred_check_setcred() hook is passed the flags received by setcred() (including the version) and both the old and new kernel's 'struct ucred' instead of 'struct setcred' as this should simplify evolving existing hooks as the 'struct setcred' structure evolves. The mac_cred_setcred_enter() and mac_cred_setcred_exit() hooks are always called by pairs around potential calls to mac_cred_check_setcred(). They allow MAC modules to allocate/free data they may need in their mac_cred_check_setcred() hook, as the latter is called under the current process' lock, rendering sleepable allocations impossible. MAC/do is going to leverage these in a subsequent commit. A scheme where mac_cred_check_setcred() could return ERESTART was considered but is incompatible with proper composition of MAC modules.
While here, add missing includes and declarations for standalone inclusion of <sys/ucred.h> both from kernel and userspace (for the latter, it has been working thanks to <bsm/audit.h> already including <sys/types.h>).
Reviewed by: brooks Approved by: markj (mentor) Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47618
show more ...
|
#
60f87c73 |
| 29-Nov-2024 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Regen
|
#
74231c81 |
| 21-Oct-2024 |
Brooks Davis <brooks@FreeBSD.org> |
sysent: regen with refactored code
All changes are no-ops and are one of: - Name changes of obsolete system calls in comments - Correct prefixes on unimplemented freebsd32 system calls - Currentl
sysent: regen with refactored code
All changes are no-ops and are one of: - Name changes of obsolete system calls in comments - Correct prefixes on unimplemented freebsd32 system calls - Currently unused macros for FreeBSD 14 compatablity
show more ...
|
#
13227efc |
| 01-Oct-2024 |
Brooks Davis <brooks@FreeBSD.org> |
sysent: regen removing comment alignment
|
#
927f3791 |
| 20-Sep-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
Regen
|
#
24b1cf7a |
| 27-Aug-2024 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
sysent: regen after d0675399
|
Revision tags: release/14.1.0 |
|
#
40895761 |
| 21-May-2024 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
Regen
|
#
e90259af |
| 13-May-2024 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
regen
Pointed out by: brooks
|
Revision tags: release/13.3.0 |
|
#
38bfddf5 |
| 19-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
regen
|
#
7893419d |
| 04-Dec-2023 |
Brooks Davis <brooks@FreeBSD.org> |
Remove never implemented sbrk and sstk syscalls
Both system calls were stubs returning EOPNOTSUPP and libc did not provide _ or __sys_ prefixed symbols. The actual implementation of sbrk(2) is on t
Remove never implemented sbrk and sstk syscalls
Both system calls were stubs returning EOPNOTSUPP and libc did not provide _ or __sys_ prefixed symbols. The actual implementation of sbrk(2) is on top of the undocumented break(2) system call.
Technically this is a change in ABI, but no non-contrived program ever called these syscalls.
Reviewed by: kib, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42872
show more ...
|
Revision tags: release/14.0.0 |
|
#
30cdbb58 |
| 24-Aug-2023 |
Stephen J. Kiernan <stevek@FreeBSD.org> |
freebsd32: Remove mac_syscall from the unimpl list
The mac_syscall system call works fine as long as any MAC module that provides a mpo_syscall method handles compat32 appropriately.
Regenerate sys
freebsd32: Remove mac_syscall from the unimpl list
The mac_syscall system call works fine as long as any MAC module that provides a mpo_syscall method handles compat32 appropriately.
Regenerate system call files for freebsd32.
Reviewed by: sjg Obtained from: Juniper Networks, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41575
show more ...
|
#
af93fea7 |
| 24-Aug-2023 |
Jake Freeland <jfree@freebsd.org> |
timerfd: Move implementation from linux compat to sys/kern
Move the timerfd impelemntation from linux compat code to sys/kern. Use it to implement the new system calls for timerfd. Add a hook to ker
timerfd: Move implementation from linux compat to sys/kern
Move the timerfd impelemntation from linux compat code to sys/kern. Use it to implement the new system calls for timerfd. Add a hook to kern_tc to allow timerfd to know when the system time has stepped. Add kqueue support to timerfd. Adjust a few names to be less Linux centric.
RelNotes: YES Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack) Differential Revision: https://reviews.freebsd.org/D38459
show more ...
|
#
c7df8720 |
| 22-Aug-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Regen
|
#
9121945d |
| 09-Jun-2023 |
Warner Losh <imp@FreeBSD.org> |
Regenerate sysent stuff after $FreeBSD$ removal
Sponsored by: Netflix
|
#
7b42f338 |
| 21-Apr-2023 |
Warner Losh <imp@FreeBSD.org> |
freebsd32: Regen
Need to regen freebsd32 as well when sys/kern/syscalls.master is updated.
Sponsored by: Netflix
|
Revision tags: release/13.2.0 |
|
#
11cdffc6 |
| 01-Apr-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Regen
|
#
6a0a6345 |
| 26-Mar-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Regen
|
Revision tags: release/12.4.0, release/13.1.0 |
|
#
f99cc5a3 |
| 14-Apr-2022 |
Ed Maste <emaste@FreeBSD.org> |
sysent: regen after 52a1d90c8bfe, posix_fadvise in capmode
|
#
8601fca7 |
| 28-Mar-2022 |
Brooks Davis <brooks@FreeBSD.org> |
sysent: regen for syscallarg_t
|
#
0910a41e |
| 13-Jan-2022 |
Brooks Davis <brooks@FreeBSD.org> |
Revert "syscallarg_t: Add a type for system call arguments"
Missed issues in truss on at least armv7 and powerpcspe need to be resolved before recommit.
This reverts commit 3889fb8af0b611e3126dc250
Revert "syscallarg_t: Add a type for system call arguments"
Missed issues in truss on at least armv7 and powerpcspe need to be resolved before recommit.
This reverts commit 3889fb8af0b611e3126dc250ebffb01805152104. This reverts commit 1544e0f5d1f1e3b8c10a64cb899a936976ca7ea4.
show more ...
|
#
3889fb8a |
| 12-Jan-2022 |
Brooks Davis <brooks@FreeBSD.org> |
sysent: regen for syscallarg_t
|
#
b7c55487 |
| 08-Dec-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Regen
|
Revision tags: release/12.3.0 |
|
#
5c1835b1 |
| 29-Nov-2021 |
Brooks Davis <brooks@FreeBSD.org> |
syscalls: regen
|
#
7fb006e7 |
| 29-Nov-2021 |
Brooks Davis <brooks@FreeBSD.org> |
syscalls: regen
|