summaryrefslogtreecommitdiffstats
path: root/pw/tests
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-07-09 14:14:44 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-07-09 14:14:44 +0000
commit6b05c812aab670bc774bcc5dcc38cfc87a401ab6 (patch)
tree5cb18fa5e62a0a66ee1339d57d7f2d3eb2e6e444 /pw/tests
parent234c04262f119960f79894ca616c3f54905022f5 (diff)
downloadpw-darwin-6b05c812aab670bc774bcc5dcc38cfc87a401ab6.tar.gz
pw-darwin-6b05c812aab670bc774bcc5dcc38cfc87a401ab6.tar.zst
pw-darwin-6b05c812aab670bc774bcc5dcc38cfc87a401ab6.zip
Do not try to set password on group if the group is added as a consequence of
of creating a user (regression from r285136) Reported by: Fabian Keil <fk@fabiankeil.de>
Diffstat (limited to 'pw/tests')
-rwxr-xr-xpw/tests/pw_useradd.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/pw/tests/pw_useradd.sh b/pw/tests/pw_useradd.sh
index 32d3b9d..469c1e5 100755
--- a/pw/tests/pw_useradd.sh
+++ b/pw/tests/pw_useradd.sh
@@ -231,6 +231,15 @@ user_add_invalid_group_entry_body() {
atf_check -s exit:1 -e match:"Invalid group entry" ${PW} useradd foo2
}
+atf_test_case user_add_password_from_h
+user_add_password_from_h_body() {
+ populate_etc_skel
+
+ atf_check -s exit:0 ${PW} useradd test -h 0 <<-EOF
+ $(echo test)
+ EOF
+}
+
atf_init_test_cases() {
atf_add_test_case user_add
atf_add_test_case user_add_noupdate
@@ -251,4 +260,5 @@ atf_init_test_cases() {
atf_add_test_case user_add_expiration
atf_add_test_case user_add_invalid_user_entry
atf_add_test_case user_add_invalid_group_entry
+ atf_add_test_case user_add_password_from_h
}