Subject: bin/789: `passwd -y' doesn't send old password correctly
To: None <gnats-admin@NetBSD.ORG>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: netbsd-bugs
Date: 02/08/1995 05:50:03
>Number: 789
>Category: bin
>Synopsis: `passwd -y' doesn't send old password correctly
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 8 05:50:02 1995
>Originator: Jason Thorpe
>Organization:
Numerical Aerodynamic Simulation Project - NASA Ames
>Release: -current of Feb 6
>Environment:
System: NetBSD antie 1.0A NetBSD 1.0A (ANTIE) #5: Tue Feb 7 14:14:26 PST 1995 thorpej@antie:/work/netbsd/src/sys/arch/i386/compile/ANTIE i386
>Description:
`passwd -y' is supposed to send the old password to rpc.yppasswdd
for authentication purposes. Instead, it is currently sending
an empty string.
>How-To-Repeat:
% passwd -y
>Fix:
===================================================================
RCS file: /mastersrc/netbsd/src/usr.bin/passwd/yp_passwd.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 yp_passwd.c
*** 1.1.1.1 1995/02/02 06:05:27
--- yp_passwd.c 1995/02/08 08:01:05
***************
*** 200,209 ****
errno = EACCES;
pw_error(NULL, 1, 1);
} else {
p = "";
}
-
- *old_pass = strdup(p);
}
for (buf[0] = '\0', tries = 0;;) {
p = getpass("New password:");
--- 200,208 ----
errno = EACCES;
pw_error(NULL, 1, 1);
} else {
+ *old_pass = strdup(p);
p = "";
}
}
for (buf[0] = '\0', tries = 0;;) {
p = getpass("New password:");
>Audit-Trail:
>Unformatted: