diff options
author | des <des@FreeBSD.org> | 2014-10-09 17:39:11 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2014-10-09 17:39:11 +0000 |
commit | 2d1d129f30bbf9f9c2cb3aa5f6ba551a9677c8a8 (patch) | |
tree | 662a7d31cca840e3911474c9f5c4996d0d3dd024 /usr.sbin | |
parent | 05bd7a92d7d665748a66769d55936d2fd3dc8990 (diff) | |
download | FreeBSD-src-2d1d129f30bbf9f9c2cb3aa5f6ba551a9677c8a8.zip FreeBSD-src-2d1d129f30bbf9f9c2cb3aa5f6ba551a9677c8a8.tar.gz |
Two more places where login_setcryptfmt() defaults to MD5 were missed
in r252688.
MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 36c5d9d..efb2901 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -615,7 +615,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args) pwd->pw_dir = pw_homepolicy(cnf, args, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cnf, args, NULL); lc = login_getpwclass(pwd); - if (lc == NULL || login_setcryptfmt(lc, "md5", NULL) == NULL) + if (lc == NULL || login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_password(cnf, args, pwd->pw_name); @@ -690,7 +690,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args) } else { lc = login_getpwclass(pwd); if (lc == NULL || - login_setcryptfmt(lc, "md5", NULL) == NULL) + login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_pwcrypt(line); |