diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-28 21:10:58 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-28 21:10:58 +0000 |
| commit | 2ecea1d66f7cf56adf485dc082d7cd3ac361e50b (patch) | |
| tree | e6e0a268f788f3a18e915694f0b6f32455427035 /pw/tests/pw_useradd.sh | |
| parent | 4bdbd4b33ea7d6b88f1425f711bafd4ab04582c7 (diff) | |
| download | pw-darwin-2ecea1d66f7cf56adf485dc082d7cd3ac361e50b.tar.gz pw-darwin-2ecea1d66f7cf56adf485dc082d7cd3ac361e50b.zip | |
Check uid/gid used when creating a user/group are not larger than UID_MAX/GID_MAX
PR: 173977
Reported by: nvass@gmx.com
Diffstat (limited to 'pw/tests/pw_useradd.sh')
| -rwxr-xr-x | pw/tests/pw_useradd.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pw/tests/pw_useradd.sh b/pw/tests/pw_useradd.sh index 880dab5..7306387 100755 --- a/pw/tests/pw_useradd.sh +++ b/pw/tests/pw_useradd.sh @@ -289,6 +289,13 @@ user_add_uid0_body() { -s exit:0 ${PW} usershow foo } +atf_test_case user_add_uid_too_large +user_add_uid_too_large_body() { + populate_etc_skel + atf_check -s exit:64 -e inline:"pw: Bad id '9999999999999': too large\n" \ + ${PW} useradd -n test1 -u 9999999999999 +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate @@ -313,4 +320,5 @@ atf_init_test_cases() { atf_add_test_case user_add_R atf_add_test_case user_add_skel atf_add_test_case user_add_uid0 + atf_add_test_case user_add_uid_too_large } |
