aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/puc
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2025-12-29 09:32:24 +0000
committerXin LI <delphij@FreeBSD.org>2026-02-04 03:56:22 +0000
commitb5e328b194561a50a6991e0a506a2532eec32ecc (patch)
tree3bff03ddedd654b094696da0131a149120630b5c /sys/dev/puc
parent2255b09a75b73d32a8ef27d3935e8fa2c492d872 (diff)
cron: Implement full PAM session lifecycle for user jobsstable/14
Extend PAM integration beyond account checks to include credential establishment and session management, allowing PAM modules to configure the execution environment for user cron jobs. Previously, cron only called pam_acct_mgmt() to verify account validity but immediately terminated the PAM handle before job execution. This prevented PAM modules from establishing sessions, setting credentials (e.g., Kerberos tickets), or exporting environment variables needed by jobs. The PAM handle now persists in the intermediate process throughout the job execution, enabling proper session open/close pairing. Credentials are established and sessions opened while still running as root, before dropping privileges in the grandchild. PAM environment variables are exported in the job process with user crontab variables taking precedence. A session rule (pam_permit.so) is added to /etc/pam.d/cron to enable session support without changing default behavior. Administrators can replace this with other modules as needed. System crontab entries continue to bypass all PAM operations. PR: bin/244844 Reviewed by: des Differential Revision: https://reviews.freebsd.org/D54415 (cherry picked from commit 12444a4da514e91fdf984b31e1691d042d5f88d2)
Diffstat (limited to 'sys/dev/puc')
0 files changed, 0 insertions, 0 deletions