mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
pw: Test home directory ownership and mode.
MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45099
This commit is contained in:
parent
46c4e86ebf
commit
e12b7446bd
1 changed files with 17 additions and 0 deletions
|
|
@ -313,6 +313,22 @@ user_add_R_intermed_body() {
|
|||
test -d ${HOME}/a/b/c/foo || atf_fail "user directory not created"
|
||||
}
|
||||
|
||||
atf_test_case user_add_dir
|
||||
user_add_dir_body() {
|
||||
populate_root_etc_skel
|
||||
|
||||
atf_check -s exit:0 ${RPW} useradd foo -M 0705 -m
|
||||
atf_check grep -q '^foo:' $HOME/etc/master.passwd
|
||||
atf_check test -d ${HOME}/home/foo
|
||||
atf_check -o save:ugid \
|
||||
awk -F: '$1 == "foo" { print $3, $4 }' \
|
||||
$HOME/etc/master.passwd
|
||||
atf_check -o file:ugid \
|
||||
stat -f '%u %g' ${HOME}/home/foo
|
||||
atf_check -o inline:"40705\n" \
|
||||
stat -f '%p' ${HOME}/home/foo
|
||||
}
|
||||
|
||||
atf_test_case user_add_skel
|
||||
user_add_skel_body() {
|
||||
populate_root_etc_skel
|
||||
|
|
@ -511,6 +527,7 @@ atf_init_test_cases() {
|
|||
atf_add_test_case user_add_R
|
||||
atf_add_test_case user_add_R_no_symlink
|
||||
atf_add_test_case user_add_R_intermed
|
||||
atf_add_test_case user_add_dir
|
||||
atf_add_test_case user_add_skel
|
||||
atf_add_test_case user_add_uid0
|
||||
atf_add_test_case user_add_uid_too_large
|
||||
|
|
|
|||
Loading…
Reference in a new issue