]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r332902: pwd_mkdb: default to network (big) endian hash order
authoremaste <emaste@FreeBSD.org>
Mon, 30 Apr 2018 00:07:41 +0000 (00:07 +0000)
committeremaste <emaste@FreeBSD.org>
Mon, 30 Apr 2018 00:07:41 +0000 (00:07 +0000)
commita58cf4de5e6d18bfc01652248ed3de2965465116
tree575c9486bda182827648a3be16ff766a2c4cf01c
parentf9582f27e125e59315384d04eafbf9c8e7f73b2f
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
usr.sbin/pwd_mkdb/pwd_mkdb.c