From 6b05c812aab670bc774bcc5dcc38cfc87a401ab6 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 9 Jul 2015 14:14:44 +0000 Subject: 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 --- pw/tests/pw_useradd.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pw/tests') 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 } -- cgit v1.2.3-56-ge451