summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-08-14 13:39:55 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-08-14 13:39:55 +0000
commitd22586d60e6708b9addf1139d8733bdadde64c15 (patch)
treea5de847cf8b4a105ae72260caf794e4409aba6b2
parent3be1f69e00d4f22f3801e24d0106f1c040bcb649 (diff)
downloadpw-darwin-d22586d60e6708b9addf1139d8733bdadde64c15.tar.gz
pw-darwin-d22586d60e6708b9addf1139d8733bdadde64c15.tar.zst
pw-darwin-d22586d60e6708b9addf1139d8733bdadde64c15.zip
Regression: fix pw usermod -w xxx
Reported by: gjb
-rw-r--r--pw/pw_user.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index d9bce87..5ccbd53 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -1645,6 +1645,8 @@ pw_user_mod(int argc, char **argv, char *arg1)
if (lc == NULL || login_setcryptfmt(lc, "sha512", NULL) == NULL)
warn("setting crypt(3) format");
login_close(lc);
+ cnf->default_password = boolean_val(passwd,
+ cnf->default_password);
pwd->pw_passwd = pw_password(cnf, pwd->pw_name, dryrun);
edited = true;
}