pw: Sync with FreeBSD
* Spelling fixes.
* Stop hard-coding default directory mode as 0777.
* Use arc4random_uniform() to avoid "modulo bias".
* Before updating the password database, the pw(8) utility first
performs a sanity check by invoking "pwd_mkdb -C". However, if this
failed it silently returned success. Fix this so it fails the update
operation instead.
* Increase the size of the salt in pw(8) from 8 to 32.
* Make it possible to have a '/' in the salt.
* Add the groupmod '-d' option to pw to allow the deletion of existing
users from a group without the need to perform the same operation by
replacing the existing list via the '-M' option. The '-M' option
requires someone to fetch the existing members with pw, deleting the
undesired members from the list and sending the altered list back.
* Do the right thing with symlinks in the skeleton directory.
* Accept passwords which contain whitespace.
* Introduce the new option -M to allow to set the permissions of the
user's newly created home directory.
* Use strlcpy(3).
* Shift file locking to source file instead of temp file.
* Add a `-H <fd>' option that is like `-h <fd>', but accepts an already
encrypted password on the specified file descriptor.
DragonFly-bug: <http://bugs.dragonflybsd.org/issue2362>
Obtained-from: FreeBSD
20 files changed: