1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00
freebsd/usr.sbin/pw/tests/Makefile
Alan Somers 7c46e6ef06 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
2016-07-13 17:09:20 +00:00

32 lines
502 B
Makefile

# $FreeBSD$
PACKAGE= tests
BINDIR= ${TESTSDIR}
PROGS+= crypt
LIBADD+= crypt
ATF_TESTS_SH= pw_etcdir \
pw_lock \
pw_config \
pw_groupadd \
pw_groupdel \
pw_groupmod \
pw_useradd \
pw_userdel \
pw_usermod \
pw_usernext
.for tp in ${ATF_TESTS_SH}
TEST_METADATA.${tp}+= required_user="root"
.endfor
${PACKAGE}FILES+= group
${PACKAGE}FILES+= helper_functions.shin
${PACKAGE}FILES+= master.passwd
${PACKAGE}FILES+= pw.conf
${PACKAGE}FILES+= pw-modified.conf
.include <bsd.test.mk>