summaryrefslogtreecommitdiffstats
path: root/commands/passwd.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-09-16 19:49:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-19 08:49:51 +0200
commit892c00584937426742a79b12243776a54980c087 (patch)
tree7f150cbb47cc6b5e57987d9382f1034b4ae85c5c /commands/passwd.c
parentbb89ea62a0b7e5c6fcedfe1a28b6dd82236247ce (diff)
downloadbarebox-892c00584937426742a79b12243776a54980c087.tar.gz
barebox-892c00584937426742a79b12243776a54980c087.tar.xz
login/passwd: add default password support
even if the env is broken you will have a password Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/passwd.c')
-rw-r--r--commands/passwd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/passwd.c b/commands/passwd.c
index baccfa6c0c..368c4016b9 100644
--- a/commands/passwd.c
+++ b/commands/passwd.c
@@ -63,7 +63,7 @@ static int do_passwd(int argc, char *argv[])
goto err;
}
- ret = set_passwd(passwd1, passwd1_len);
+ ret = set_env_passwd(passwd1, passwd1_len);
if (ret < 0) {
puts("Sorry, passwords write failed\n");
@@ -78,15 +78,15 @@ err:
return 1;
disable:
- passwd_disable();
+ passwd_env_disable();
puts("passwd: password disabled\n");
return ret;
}
static const __maybe_unused char cmd_passwd_help[] =
"Usage: passwd\n"
-"passwd allow you to specify a password\n"
-"to disable it put an empty password\n"
+"passwd allow you to specify a password in the env\n"
+"to disable it put an empty password will still use the default password if set\n"
;
BAREBOX_CMD_START(passwd)