Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F92074069
draft_test.patch
jlduran (Jose Luis Duran)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
jlduran
Aug 27 2024, 1:36 AM
2024-08-27 01:36:49 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
draft_test.patch
View Options
diff --git a/usr.sbin/pw/tests/pw_useradd_test.sh b/usr.sbin/pw/tests/pw_useradd_test.sh
index b4efa42bada7..6413c063d482 100755
--- a/usr.sbin/pw/tests/pw_useradd_test.sh
+++ b/usr.sbin/pw/tests/pw_useradd_test.sh
@@ -329,6 +329,21 @@ user_add_dir_body() {
stat -f '%p' ${HOME}/home/foo
}
+atf_test_case user_add_existing_dir
+user_add_existing_dir_body() {
+ populate_root_etc_skel
+
+ mkdir -p -m 0777 ${HOME}/home/foo
+ atf_check -o inline:"40777\n" \
+ stat -f '%p' ${HOME}/home/foo
+
+ 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 inline:"40705\n" \
+ stat -f '%p' ${HOME}/home/foo
+}
+
atf_test_case user_add_skel
user_add_skel_body() {
populate_root_etc_skel
@@ -528,6 +543,7 @@ atf_init_test_cases() {
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_existing_dir
atf_add_test_case user_add_skel
atf_add_test_case user_add_uid0
atf_add_test_case user_add_uid_too_large
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11212916
Default Alt Text
draft_test.patch (1 KB)
Attached To
Mode
D46443: pw: set the user's home directory mode if it existed
Attached
Detach File
Event Timeline
Log In to Comment