pw: Sync with FreeBSD
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 6 May 2012 19:11:50 +0000 (12:11 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 6 May 2012 19:27:48 +0000 (12:27 -0700)
commit500b62b4a51de59d7f82d5d21af3f810b64b3de2
tree418e628354358d7417a4658b63ff1488618fac4d
parentdff6f2a037e4971885723b318ffc389f7cc72ffc
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:
usr.sbin/pw/Makefile
usr.sbin/pw/bitmap.h
usr.sbin/pw/cpdir.c
usr.sbin/pw/edgroup.c
usr.sbin/pw/fileupd.c
usr.sbin/pw/grupd.c
usr.sbin/pw/psdate.c
usr.sbin/pw/psdate.h
usr.sbin/pw/pw.8
usr.sbin/pw/pw.c
usr.sbin/pw/pw.conf.5
usr.sbin/pw/pw.h
usr.sbin/pw/pw_conf.c
usr.sbin/pw/pw_group.c
usr.sbin/pw/pw_log.c
usr.sbin/pw/pw_user.c
usr.sbin/pw/pw_vpw.c
usr.sbin/pw/pwupd.c
usr.sbin/pw/pwupd.h
usr.sbin/pw/rm_r.c