summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd/local_passwd.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-06-24 18:08:25 +0000
committerwpaul <wpaul@FreeBSD.org>1995-06-24 18:08:25 +0000
commit87254380ba02677b45895472eb8a49f84242fdc1 (patch)
tree477a99f250474c073dd1147a5f38091132f49a29 /usr.bin/passwd/local_passwd.c
parent81948f780489478cb8f53b0ed85e472e229013ba (diff)
downloadFreeBSD-src-87254380ba02677b45895472eb8a49f84242fdc1.zip
FreeBSD-src-87254380ba02677b45895472eb8a49f84242fdc1.tar.gz
Whoops: getnewpasswd() always says "Changing local password for foo".
Change things slightly so this message says "local" or "YP" as needed so we can use it for both NIS and local password changes without confusing people.
Diffstat (limited to 'usr.bin/passwd/local_passwd.c')
-rw-r--r--usr.bin/passwd/local_passwd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c
index 89d485f..7ea907b 100644
--- a/usr.bin/passwd/local_passwd.c
+++ b/usr.bin/passwd/local_passwd.c
@@ -73,15 +73,17 @@ to64(s, v, n)
}
char *
-getnewpasswd(pw)
+getnewpasswd(pw, nis)
struct passwd *pw;
+ int nis;
{
int tries;
char *p, *t;
char buf[_PASSWORD_LEN+1], salt[9];
struct timeval tv;
- (void)printf("Changing local password for %s.\n", pw->pw_name);
+ (void)printf("Changing %s password for %s.\n", pw->pw_name,
+ nis ? "YP" : "local");
if (uid && pw->pw_passwd[0] &&
strcmp(crypt(getpass("Old password:"), pw->pw_passwd),
@@ -150,7 +152,7 @@ local_passwd(uname)
* classes are implemented, go and get the "offset" value for this
* class and reset the timer.
*/
- pw->pw_passwd = getnewpasswd(pw);
+ pw->pw_passwd = getnewpasswd(pw, 0);
pw->pw_change = 0;
pw_copy(pfd, tfd, pw);
OpenPOWER on IntegriCloud