summaryrefslogtreecommitdiff
path: root/security/sudo/files/patch-auth::pam.c
diff options
context:
space:
mode:
authorMichael Haro <mharo@FreeBSD.org>2003-04-19 20:21:29 +0000
committerMichael Haro <mharo@FreeBSD.org>2003-04-19 20:21:29 +0000
commit1fd724590121dde0735d9bda55da57cb3b3a10af (patch)
tree2b279b248c5f401cc3ddbf0ac8c1d12a7329d15b /security/sudo/files/patch-auth::pam.c
parentupdate port sysutils/ipa 1.3.2 -> 1.3.3 (diff)
update from 1.6.6 to 1.6.7p4
PR: 51084 Submitted by: Sergey A. Osokin <osa@freebsd.org.ru>
Notes
Notes: svn path=/head/; revision=79307
Diffstat (limited to 'security/sudo/files/patch-auth::pam.c')
-rw-r--r--security/sudo/files/patch-auth::pam.c55
1 files changed, 12 insertions, 43 deletions
diff --git a/security/sudo/files/patch-auth::pam.c b/security/sudo/files/patch-auth::pam.c
index 7dfcb89497a9..bed7753f8257 100644
--- a/security/sudo/files/patch-auth::pam.c
+++ b/security/sudo/files/patch-auth::pam.c
@@ -1,47 +1,16 @@
-Index: auth/pam.c
-===================================================================
-RCS file: /home/cvs/sudo/sudo/auth/pam.c,v
-retrieving revision 1.30
-retrieving revision 1.31
-diff -u -r1.30 -r1.31
---- auth/pam.c 22 Nov 2002 19:41:13 -0000 1.30
-+++ auth/pam.c 13 Dec 2002 16:33:26 -0000 1.31
-@@ -66,7 +66,7 @@
- #include "sudo_auth.h"
-
- #ifndef lint
--static const char rcsid[] = "$Sudo: pam.c,v 1.29 2002/01/22 16:43:23 millert Exp $";
-+static const char rcsid[] = "$Sudo: pam.c,v 1.30 2002/11/22 19:41:13 millert Exp $";
- #endif /* lint */
-
- static int sudo_conv __P((int, PAM_CONST struct pam_message **,
-@@ -205,7 +205,7 @@
- PAM_CONST struct pam_message *pm;
- const char *p = def_prompt;
- char *pass;
-- int n;
-+ int n, flags;
- extern int nil_pw;
-
- if ((*response = malloc(num_msg * sizeof(struct pam_response))) == NULL)
-@@ -213,17 +213,17 @@
- (void) memset(*response, 0, num_msg * sizeof(struct pam_response));
-
- for (pr = *response, pm = *msg, n = num_msg; n--; pr++, pm++) {
-+ flags = tgetpass_flags;
- switch (pm->msg_style) {
- case PAM_PROMPT_ECHO_ON:
-- tgetpass_flags |= TGP_ECHO;
-+ flags |= TGP_ECHO;
- case PAM_PROMPT_ECHO_OFF:
- /* Only override PAM prompt if it matches /^Password: ?/ */
- if (strncmp(pm->msg, "Password:", 9) || (pm->msg[9] != '\0'
- && (pm->msg[9] != ' ' || pm->msg[10] != '\0')))
+--- auth/pam.c.orig Wed Apr 2 11:55:50 2003
++++ auth/pam.c Wed Apr 2 11:57:32 2003
+@@ -224,11 +224,11 @@
p = pm->msg;
/* Read the password. */
-- pass = tgetpass(p, def_ival(I_PASSWD_TIMEOUT) * 60,
-- tgetpass_flags);
-+ pass = tgetpass(p, def_ival(I_PASSWD_TIMEOUT) * 60, flags);
- pr->resp = estrdup(pass ? pass : "");
+ pass = tgetpass(p, def_ival(I_PASSWD_TIMEOUT) * 60, flags);
+- pr->resp = estrdup(pass ? pass : "");
++ pr->resp = estrdup((const char *)pass ? (const char *)pass : "");
if (*pr->resp == '\0')
nil_pw = 1; /* empty password */
+ else
+- memset(pass, 0, strlen(pass));
++ memset((void *)pass, 0, strlen((const char *)pass));
+ break;
+ case PAM_TEXT_INFO:
+ if (pm->msg)