diff options
author | Alan Somers <asomers@FreeBSD.org> | 2016-07-13 17:09:20 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2016-07-13 17:09:20 +0000 |
commit | 7c46e6ef064304569f110371ff08ff3737a68351 (patch) | |
tree | a9067900ffae4d6b6bed86db1b81c5ce0c2f2727 /tools/test | |
parent | ab1e39bc6bc0adf6df49fe795847b97985e9e1d5 (diff) | |
download | src-7c46e6ef064304569f110371ff08ff3737a68351.tar.gz src-7c46e6ef064304569f110371ff08ff3737a68351.zip |
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.
Reviewed by: bapt
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6840
Notes
Notes:
svn path=/head/; revision=302778
Diffstat (limited to 'tools/test')
0 files changed, 0 insertions, 0 deletions