aboutsummaryrefslogtreecommitdiff
path: root/lib/libcrypt
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-11-17 16:45:58 +0000
committerMark Johnston <markj@FreeBSD.org>2025-12-08 14:14:58 +0000
commit7edef9117688a15d53123f837efa25bf9e4a9d28 (patch)
tree1fab10ac6c33a561625cc8bae7b2ea4bab4abd58 /lib/libcrypt
parente4e7b5840f97d7ee7963f8a4d3fc30ad0ad802af (diff)
rc.subr: Support setting the audit user when starting services
When an unprivileged user restarts a service using, e.g., sudo, the service runs with the audit user ID set to that of the unprivileged user. This can have surprising effects: for instance, a user that restarts a jail that is running sshd will end up with their UID attached to all audit logs associated with users who log in via that sshd instance. (sshd will set the audit user, but this is disallowed in jails by default.) Add support for rc.conf directives which cause rc to override the audit user. Specifically, make <name>_audit_user=foo cause the audit user to be set to "foo" for service <name>. A plain audit_user=foo directive causes all services to be started as foo. Note, like other similar rc features, this feature is limited to rc services which are run by executing a command. Shell functions can't be wrapped this way. Reviewed by: 0mp MFC after: 2 weeks Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53747 (cherry picked from commit 39ee24182b92114d006abc2b8095334a1d8a083c)
Diffstat (limited to 'lib/libcrypt')
0 files changed, 0 insertions, 0 deletions