aboutsummaryrefslogtreecommitdiff
path: root/lib/libsys/_libsys.h
Commit message (Collapse)AuthorAgeFilesLines
* RegenKonstantin Belousov2026-03-051-0/+2
|
* Regen syscall tables after pdfork(2) and pdwait(2) additionsKonstantin Belousov2026-01-251-0/+4
|
* sysent: Regen for kexec_load()Justin Hibbits2025-10-271-0/+3
|
* jail: add jail descriptorsJamie Gritton2025-09-041-0/+4
| | | | | | | | | | | | Similar to process descriptors, jail desriptors are allow jail administration using the file descriptor interface instead of JIDs. They come from and can be used by jail_set(2) and jail_get(2), and there are two new system calls, jail_attach_jd(2) and jail_remove_jd(2). Reviewed by: bz, brooks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D43696
* sysent: regenerate after bumping setgroups/getgroupsKyle Evans2025-08-151-4/+4
|
* sysent: regen to mark _exit _NoreturnBrooks Davis2025-08-081-1/+1
|
* sysent: regen for _exit(2) normalizationBrooks Davis2025-08-081-2/+2
|
* sysent: regen for const __sysctl argumentBrooks Davis2025-08-011-2/+2
|
* inotify: Regenerate syscall definitionsMark Johnston2025-07-041-0/+4
| | | | Sponsored by: Klara, Inc.
* RegenKonstantin Belousov2025-05-311-0/+2
|
* sysent: regen for deletion of gssd_syscall and new ABI for rpctls_syscallGleb Smirnoff2025-02-011-2/+2
|
* kgssapi: remove the gssd_syscallGleb Smirnoff2025-02-011-2/+0
| | | | | Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D48554
* New setcred() system call and associated MAC hooksOlivier Certner2024-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* RegenEdward Tomasz Napierala2024-11-291-0/+2
|
* sysent: regen commentsBrooks Davis2024-10-031-0/+1
|
* sysent: regen commentsBrooks Davis2024-10-011-1/+1
|
* RegenKonstantin Belousov2024-09-271-0/+2
|
* syscalls.master: correct return type of {read,write}vBrooks Davis2024-04-241-4/+4
| | | | | | | | | This was missed when read/write, etc were updated to return ssize_t. Fixes: 2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D44930
* libsys: add a libsys.hBrooks Davis2024-04-161-0/+865
This declares an API for libsys which currently consists of __sys_<foo>() declarations for system call stubs and function pointer typedefs of the form __sys_<foo>_t. The vast majority of the implementation resides in a generated _libsys.h which ensures that all system call stub declarations match syscalls.master. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44387