summaryrefslogtreecommitdiffstats
path: root/pw/tests
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-01-26 16:50:42 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-01-26 16:50:42 +0000
commit189e321d5d94ca77eab7e74e1ac94c51c4054e68 (patch)
tree364b59df0e4314ead1751b89af2ac9f5bfb8ca9c /pw/tests
parentecce87b75197d392a8adcdbd6f11dcf1ddd573d2 (diff)
downloadpw-darwin-189e321d5d94ca77eab7e74e1ac94c51c4054e68.tar.gz
pw-darwin-189e321d5d94ca77eab7e74e1ac94c51c4054e68.tar.zst
pw-darwin-189e321d5d94ca77eab7e74e1ac94c51c4054e68.zip
Revert r277652
uid and gid are never and should never be negative. The pw(8) manpage clearly states the -u and -g arguments are for uids/gids, hence using negative values is abusing a bug in former versions of pw(8)
Diffstat (limited to 'pw/tests')
-rw-r--r--pw/tests/Makefile4
-rwxr-xr-xpw/tests/pw_groupshow.sh19
-rwxr-xr-xpw/tests/pw_usershow.sh19
3 files changed, 1 insertions, 41 deletions
diff --git a/pw/tests/Makefile b/pw/tests/Makefile
index c609884..1283ff2 100644
--- a/pw/tests/Makefile
+++ b/pw/tests/Makefile
@@ -9,11 +9,9 @@ ATF_TESTS_SH= pw_etcdir \
pw_lock \
pw_groupdel \
pw_groupmod \
- pw_groupshow \
pw_useradd \
pw_userdel \
- pw_usermod \
- pw_usershow
+ pw_usermod
.for tp in ${ATF_TESTS_SH}
TEST_METADATA.${tp}+= required_user="root"
diff --git a/pw/tests/pw_groupshow.sh b/pw/tests/pw_groupshow.sh
deleted file mode 100755
index 2ba53d6..0000000
--- a/pw/tests/pw_groupshow.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-# $FreeBSD$
-
-# Import helper functions
-. $(atf_get_srcdir)/helper_functions.shin
-
-
-# Test negative uid are still valid
-# PR: 196514
-atf_test_case show_group_with_negative_number
-show_group_with_negative_number_body() {
- populate_etc_skel
- atf_check -s exit:0 \
- -o inline:"wheel:*:0:root\n" \
- ${PW} groupshow -n wheel -g -1
-}
-
-atf_init_test_cases() {
- atf_add_test_case show_group_with_negative_number
-}
diff --git a/pw/tests/pw_usershow.sh b/pw/tests/pw_usershow.sh
deleted file mode 100755
index 4703644..0000000
--- a/pw/tests/pw_usershow.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-# $FreeBSD$
-
-# Import helper functions
-. $(atf_get_srcdir)/helper_functions.shin
-
-
-# Test negative uid are still valid
-# PR: 196514
-atf_test_case show_user_with_negative_number
-show_user_with_negative_number_body() {
- populate_etc_skel
- atf_check -s exit:0 \
- -o inline:"root:*:0:0::0:0:Charlie &:/root:/bin/csh\n" \
- ${PW} usershow -n root -u -1
-}
-
-atf_init_test_cases() {
- atf_add_test_case show_user_with_negative_number
-}