aboutsummaryrefslogtreecommitdiff
path: root/toys/passwd.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-07-21 18:38:36 -0500
committerRob Landley <rob@landley.net>2012-07-21 18:38:36 -0500
commit6ba38c2c79c12c5f2227ee4a87c9875fae407332 (patch)
treee63a13020909ab6a881b4283465284af3fbbcd82 /toys/passwd.c
parent6d878191f18b89ac6c40f078fd62e8b61f484023 (diff)
downloadtoybox-6ba38c2c79c12c5f2227ee4a87c9875fae407332.tar.gz
Use "_password" instead of "_passwd" for names in lib/password.c.
Diffstat (limited to 'toys/passwd.c')
-rw-r--r--toys/passwd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/toys/passwd.c b/toys/passwd.c
index 501ce952..122cd942 100644
--- a/toys/passwd.c
+++ b/toys/passwd.c
@@ -144,12 +144,12 @@ static char *new_password(char *oldp, char *user)
{
char *newp = NULL;
- if(read_passwd(toybuf, sizeof(toybuf), "New password:"))
+ if(read_password(toybuf, sizeof(toybuf), "New password:"))
return NULL; //may be due to Ctrl-C
newp = xstrdup(toybuf);
strength_check(newp, oldp, user);
- if(read_passwd(toybuf, sizeof(toybuf), "Retype password:")) {
+ if(read_password(toybuf, sizeof(toybuf), "Retype password:")) {
free(newp);
return NULL; //may be due to Ctrl-C
}
@@ -210,7 +210,7 @@ void passwd_main(void)
if(myuid != 0) {
/*Validate user */
- if(read_passwd(toybuf, sizeof(toybuf), "Origial password:")) {
+ if(read_password(toybuf, sizeof(toybuf), "Origial password:")) {
if(!toys.optargs[0]) free(name);
return;
}
@@ -259,9 +259,9 @@ void passwd_main(void)
/*Update the passwd */
if(pw->pw_passwd[0] == 'x')
- ret = update_passwd("/etc/shadow", name, encrypted);
+ ret = update_password("/etc/shadow", name, encrypted);
else
- ret = update_passwd("/etc/passwd", name, encrypted);
+ ret = update_password("/etc/passwd", name, encrypted);
if((toys.optflags & (FLAG_l | FLAG_u | FLAG_d)))
free(encrypted);