Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Oct 2014 17:39:11 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272833 - head/usr.sbin/pw
Message-ID:  <201410091739.s99HdBjb009191@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Thu Oct  9 17:39:11 2014
New Revision: 272833
URL: https://svnweb.freebsd.org/changeset/base/272833

Log:
  Two more places where login_setcryptfmt() defaults to MD5 were missed
  in r252688.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/pw/pw_user.c

Modified: head/usr.sbin/pw/pw_user.c
==============================================================================
--- head/usr.sbin/pw/pw_user.c	Thu Oct  9 17:26:29 2014	(r272832)
+++ head/usr.sbin/pw/pw_user.c	Thu Oct  9 17:39:11 2014	(r272833)
@@ -615,7 +615,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);
@@ -690,7 +690,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410091739.s99HdBjb009191>