diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2008-11-24 15:13:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2008-11-24 15:13:36 +0000 |
commit | 258bc5d0e768bac6b7cdce1f567dbe0a847c599c (patch) | |
tree | 3a257b8a16bcc9e2d3a909087ac4ebdbf5f5d24f /usr.bin/sudo/auth | |
parent | 7509bfd1e0546e22deba97e48b614b0e2fe8cd07 (diff) |
Fix typo in sudoers man page (from Markus Lude)
Fix parsing error with lines that only contain a comment char
Diffstat (limited to 'usr.bin/sudo/auth')
-rw-r--r-- | usr.bin/sudo/auth/pam.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/sudo/auth/pam.c b/usr.bin/sudo/auth/pam.c index af448de7071..add9c804c51 100644 --- a/usr.bin/sudo/auth/pam.c +++ b/usr.bin/sudo/auth/pam.c @@ -45,6 +45,7 @@ # include <unistd.h> #endif /* HAVE_UNISTD_H */ #include <pwd.h> +#include <errno.h> #ifdef HAVE_PAM_PAM_APPL_H # include <pam/pam_appl.h> @@ -72,7 +73,7 @@ #endif #ifndef lint -__unused static const char rcsid[] = "$Sudo: pam.c,v 1.64 2008/11/09 14:13:13 millert Exp $"; +__unused static const char rcsid[] = "$Sudo: pam.c,v 1.65 2008/11/22 18:17:44 millert Exp $"; #endif /* lint */ static int sudo_conv __P((int, PAM_CONST struct pam_message **, @@ -286,12 +287,17 @@ sudo_conv(num_msg, msg, response, appdata_ptr) && (pm->msg[9] != ' ' || pm->msg[10] != '\0')))) prompt = pm->msg; #endif - /* Read the password. */ + /* Read the password unless interrupted. */ pass = tgetpass(prompt, def_passwd_timeout * 60, flags); if (pass == NULL) { /* We got ^C instead of a password; abort quickly. */ - gotintr = 1; + if (errno == EINTR) + gotintr = 1; +#if defined(__darwin__) || defined(__APPLE__) + pass = ""; +#else goto err; +#endif } pr->resp = estrdup(pass); zero_bytes(pass, strlen(pass)); |