Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2018 00:07:41 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r333094 - stable/11/usr.sbin/pwd_mkdb
Message-ID:  <201804300007.w3U07fdi095241@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Apr 30 00:07:41 2018
New Revision: 333094
URL: https://svnweb.freebsd.org/changeset/base/333094

Log:
  MFC r332902: pwd_mkdb: default to network (big) endian hash order
  
  For cross-architecture reproducibility. The db(3) functions work with
  hashes of either endianness, and the current (v4) version password db
  entries already store integers in network order.  Do so with the hash as
  well so that identical password databases can be created on big- and
  little-endian hosts.
  
  The -B and -L flags exist to set the endianness for legacy (v3) entries
  when the -l flag is used, and they will still control hash endianness
  (at least until the backwards compatibility infrastructure is removed
  [a change that will not be merged to stable/11]).
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/11/usr.sbin/pwd_mkdb/pwd_mkdb.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/pwd_mkdb/pwd_mkdb.c
==============================================================================
--- stable/11/usr.sbin/pwd_mkdb/pwd_mkdb.c	Sun Apr 29 20:24:03 2018	(r333093)
+++ stable/11/usr.sbin/pwd_mkdb/pwd_mkdb.c	Mon Apr 30 00:07:41 2018	(r333094)
@@ -75,7 +75,7 @@ static HASHINFO openinfo = {
 	256,		/* nelem */
 	2048 * 1024,	/* cachesize */
 	NULL,		/* hash() */
-	BYTE_ORDER	/* lorder */
+	BIG_ENDIAN	/* lorder */
 };
 
 static enum state { FILE_INSECURE, FILE_SECURE, FILE_ORIG } clean;



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