diff options
author | 2014-10-11 17:16:18 +0000 | |
---|---|---|
committer | 2014-10-11 17:16:18 +0000 | |
commit | a67255c0571b3f564056b8dd161f54db9815c014 (patch) | |
tree | 93614c3a0e1472955c866828180df37c3d183d1a | |
parent | c060b30250b3b666ae19dc91192abdfc89250b62 (diff) | |
parent | 9a00d5bef48e2e002e065c8db0ac7ae0629b5625 (diff) | |
download | pw-darwin-a67255c0571b3f564056b8dd161f54db9815c014.tar.gz pw-darwin-a67255c0571b3f564056b8dd161f54db9815c014.tar.zst pw-darwin-a67255c0571b3f564056b8dd161f54db9815c014.zip |
Merge HEAD@r272944.
-rw-r--r-- | pw/Makefile | 6 | ||||
-rw-r--r-- | pw/pw_user.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/pw/Makefile b/pw/Makefile index eae0b87..8c5acf9 100644 --- a/pw/Makefile +++ b/pw/Makefile @@ -11,4 +11,10 @@ WARNS?= 2 DPADD= ${LIBCRYPT} ${LIBUTIL} LDADD= -lcrypt -lutil +.include <src.opts.mk> + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include <bsd.prog.mk> diff --git a/pw/pw_user.c b/pw/pw_user.c index 36c5d9d..efb2901 100644 --- a/pw/pw_user.c +++ b/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); |