0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

fix: check non-zero return code for posix_spawnp

This commit is contained in:
MusiKid 2022-01-25 18:24:26 +01:00 committed by musikid
parent 9dae2b66b3
commit 5afb74857e
No known key found for this signature in database
GPG key ID: 7567D43648C6E2F4

View file

@ -271,7 +271,7 @@ auto identify(pam_handle_t *pamh, int flags, int argc, const char **argv,
// Start the python subprocess
if (posix_spawnp(&child_pid, PYTHON_EXECUTABLE, nullptr, nullptr,
const_cast<char *const *>(args), nullptr) > 0) {
const_cast<char *const *>(args), nullptr) != 0) {
syslog(LOG_ERR, "Can't spawn the howdy process: %s (%d)", strerror(errno),
errno);
return PAM_SYSTEM_ERR;