svn commit: r273427 - stable/9/usr.sbin/pw

Xin LI delphij at FreeBSD.org
Tue Oct 21 21:11:26 UTC 2014


Author: delphij
Date: Tue Oct 21 21:11:25 2014
New Revision: 273427
URL: https://svnweb.freebsd.org/changeset/base/273427

Log:
  MFC r272833 (des):
  
  Two more places where login_setcryptfmt() defaults to MD5 were missed
  in r252688.

Modified:
  stable/9/usr.sbin/pw/pw_user.c
Directory Properties:
  stable/9/usr.sbin/pw/   (props changed)

Modified: stable/9/usr.sbin/pw/pw_user.c
==============================================================================
--- stable/9/usr.sbin/pw/pw_user.c	Tue Oct 21 21:09:54 2014	(r273426)
+++ stable/9/usr.sbin/pw/pw_user.c	Tue Oct 21 21:11:25 2014	(r273427)
@@ -586,7 +586,7 @@ pw_user(struct userconf * cnf, int mode,
 		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);
@@ -661,7 +661,7 @@ pw_user(struct userconf * cnf, int mode,
 			} 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);


More information about the svn-src-stable-9 mailing list