File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1515# set to YES.
1616#rc_interactive="YES"
1717
18+ # Set to "NO" if you don't want pam_openrc autostarting user services. This
19+ # effetively disables the pam module, without the need of removing it from
20+ # the pam configuration files.
21+ #rc_autostart_users="YES"
22+
1823# If we need to drop to a shell, you can specify it here.
1924# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
2025# otherwise /bin/sh
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ exec_openrc(pam_handle_t *pamh, bool opening)
2323 struct passwd * user ;
2424 pid_t pid = -1 ;
2525
26+ errno = 0 ;
27+ if (!rc_yesno (rc_conf_value ("rc_autostart_users" )) && errno == 0 )
28+ return PAM_SUCCESS ;
29+
2630 setenv ("EINFO_LOG" , "pam_openrc" , true);
2731
2832 if (pam_get_item (pamh , PAM_SERVICE , (const void * * )& session ) != PAM_SUCCESS ) {
You can’t perform that action at this time.
0 commit comments