diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2013-08-29 14:09:39 +0200 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2013-08-29 14:09:39 +0200 |
commit | a9ac7fd64000712fdedd4c38b408ffebd2988156 (patch) | |
tree | 46c81fe5f0162f8303a41323c086205d5abc2529 /modules/pam_unix/support.c | |
parent | 405d66163397b60eb0bc7aa304e6f13fda7108ef (diff) | |
download | pam-a9ac7fd64000712fdedd4c38b408ffebd2988156.tar.gz pam-a9ac7fd64000712fdedd4c38b408ffebd2988156.tar.bz2 pam-a9ac7fd64000712fdedd4c38b408ffebd2988156.zip |
Restart waitpid if it returns with EINTR (ticket #17)
* modules/pam_unix/pam_unix_acct.c: run waitpid in a while loop.
* modules/pam_unix/pam_unix_passwd.c: Likewise.
* modules/pam_unix/support.c: Likewise.
Diffstat (limited to 'modules/pam_unix/support.c')
-rw-r--r-- | modules/pam_unix/support.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index f36786e4..d8f4a6f7 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -621,7 +621,8 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd, } close(fds[0]); /* close here to avoid possible SIGPIPE above */ close(fds[1]); - rc=waitpid(child, &retval, 0); /* wait for helper to complete */ + /* wait for helper to complete: */ + while ((rc=waitpid(child, &retval, 0)) < 0 && errno == EINTR); if (rc<0) { pam_syslog(pamh, LOG_ERR, "unix_chkpwd waitpid returned %d: %m", rc); retval = PAM_AUTH_ERR; |