pam_systemd: don't use PAM_SYSTEM_ERR for something that isn't precisely a system error

It's not really clear which PAM errors to use for which conditions, but
something called PAM_SYSTEM_ERR should probably not be used when the
error is not the result of some system call failure.
This commit is contained in:
Lennart Poettering 2019-08-13 14:14:47 +02:00
parent 1798f5afe3
commit 8d46418e93

View file

@ -660,7 +660,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
return PAM_SUCCESS;
} else {
pam_syslog(handle, LOG_ERR, "Failed to create session: %s", bus_error_message(&error, r));
return PAM_SYSTEM_ERR;
return PAM_SESSION_ERR;
}
}