[Bug 244844] Cron does not support PAM sessions

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Mar 16 11:37:44 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244844

            Bug ID: 244844
           Summary: Cron does not support PAM sessions
           Product: Base System
           Version: 12.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: kevin at lyda.ie

Some distributions of Linux have configured and activated pam_env[0] from the
LinuxPAM project. The OpenPAM project lacks this module but it's easy enough to
write.  It sets environment variables for an authenticated session from a file
named /etc/environment by default.

A similar module for OpenPAM works just fine for ssh and several other cases,
but not for cron.  Checking the diff between do_command.c in FreeBSD cron[1]
and the current Vixie cron[2], it's clear that the pam_open_session and
pam_close_session calls are missing in FreeBSD cron.

Would there be any interest in patches to fix this?

[0] http://www.linux-pam.org/Linux-PAM-html/sag-pam_env.html
[1]
https://github.com/freebsd/freebsd/blob/master/usr.sbin/cron/cron/do_command.c
[2] https://github.com/svagner/vixie-cron/blob/master/do_command.c

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list