]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r302778
authorasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 12 Sep 2016 17:35:45 +0000 (17:35 +0000)
committerasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 12 Sep 2016 17:35:45 +0000 (17:35 +0000)
commit8c932ee39ffc2421435b19fda20d88d455b80f6e
tree1dc8f73e718333e9898a666df5b1a795540f17c4
parent33d2f5365f0dc0c1245d07bc6e062d085eec3801
MFC r302778

pw should sanitize the argument of -w.

Otherwise, it will silently disable the login for the selected account if
the argument is unrecognizable.

usr.sbin/pw/pw.h
usr.sbin/pw/pw_conf.c
usr.sbin/pw/pw_user.c
        Use separate rules to validate boolean parameters and passwd
        parameters.  Error out if a password parameter cannot be parsed.

usr.sbin/pw/tests/Makefile
usr.sbin/pw/tests/crypt.c
usr.sbin/pw/tests/pw_useradd.sh
usr.sbin/pw/tests/pw_usermod.sh
        Add tests for the validation.  Also, enhance existing
        password-related tests to actually validate that the correct hash is
        written to master.passwd.

git-svn-id: svn://svn.freebsd.org/base/stable/10@305750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/pw/pw.h
usr.sbin/pw/pw_conf.c
usr.sbin/pw/pw_user.c
usr.sbin/pw/tests/Makefile
usr.sbin/pw/tests/crypt.c [new file with mode: 0644]
usr.sbin/pw/tests/pw_useradd.sh
usr.sbin/pw/tests/pw_usermod.sh