diff options
author | bapt <bapt@FreeBSD.org> | 2015-07-03 14:22:44 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-07-03 14:22:44 +0000 |
commit | 9420a4ea0e57a8af4cb3a021b5529153fcb64251 (patch) | |
tree | d53116e1f843494918313336ade226a34d28f4f4 /usr.sbin/pw/tests/pw_delete.sh | |
parent | af3b3e839600760eccc5a9e28b4d86d1ee729b03 (diff) | |
download | FreeBSD-src-9420a4ea0e57a8af4cb3a021b5529153fcb64251.zip FreeBSD-src-9420a4ea0e57a8af4cb3a021b5529153fcb64251.tar.gz |
MFC: r274011,r274022,r274453,r274542,r274632,r274727,r275653,r275656,r275657,
r275658,r275829,r277652,r277764,r278475,r278767,r278819,r278902,r279256,
r282681,r282683,r282685,r282686,r282687,r282697,r282698,r282699,r282700,
r282709,r282712,r282713,r282716,r282718,r282719,r282720,r282721,r283809,
r283810,r283811,r283814,r283815,r283816,r283818,r283841,r283842,r283843,
r283961,r283962,r284110,r284111,r284112,r284113,r284114,r284117,r284118,
r284119,r284120,r284121,r284122,r284123,r284124,r284126,r284128,r284129,
r284130,r284133,r284135,r284137,r284139,r284140,r284148,r284149,r284392
Lots of cleanup in the pw(8) code
Add pw -R <rootdir>
Add lots of regression tests
More accurate error messages
Approved by: re (kib)
Sponsored by: gandi.net
Diffstat (limited to 'usr.sbin/pw/tests/pw_delete.sh')
-rwxr-xr-x | usr.sbin/pw/tests/pw_delete.sh | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/usr.sbin/pw/tests/pw_delete.sh b/usr.sbin/pw/tests/pw_delete.sh deleted file mode 100755 index 0e97939..0000000 --- a/usr.sbin/pw/tests/pw_delete.sh +++ /dev/null @@ -1,47 +0,0 @@ -# $FreeBSD$ - -# Import helper functions -. $(atf_get_srcdir)/helper_functions.shin - -# Test that a user can be deleted when another user is part of this -# user's default group and does not go into an infinate loop. -# PR: 191427 -atf_test_case rmuser_seperate_group cleanup -rmuser_seperate_group_head() { - atf_set "timeout" "30" -} -rmuser_seperate_group_body() { - populate_etc_skel - pw -V ${HOME} useradd test || atf_fail "Creating test user" - pw -V ${HOME} groupmod test -M 'test,root' || \ - atf_fail "Modifying the group" - pw -V ${HOME} userdel test || atf_fail "delete the user" -} - -atf_test_case group_do_not_delete_wheel_if_group_unkown -group_do_not_delete_wheel_if_group_unkown_head() { - atf_set "descr" "Make sure we do not consider as gid 0 an unknown group" -} - -group_do_not_delete_wheel_if_group_unkown_body() { - populate_etc_skel - atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x pw -V ${HOME} groupshow wheel - atf_check -e inline:"pw: -g expects a number\n" -s exit:64 -x pw -V ${HOME} groupdel -g I_do_not_exist - atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x pw -V ${HOME} groupshow wheel -} - -atf_test_case user_do_not_try_to_delete_root_if_user_unkown -user_do_not_try_to_delete_root_if_user_unkown_head() { - atf_set "descr" "Make sure not to try to remove root if deleteing an unknown user" -} - -user_do_not_try_to_delete_root_if_user_unkown_body() { - populate_etc_skel - atf_check -e inline:"pw: -u expects a number\n" -s exit:64 -x pw -V ${HOME} userdel -u plop -} - -atf_init_test_cases() { - atf_add_test_case rmuser_seperate_group - atf_add_test_case group_do_not_delete_wheel_if_group_unkown - atf_add_test_case user_do_not_try_to_delete_root_if_user_unkown -} |