opnsense-src/usr.sbin/pw/tests
Mike Karels bbb2d2ce42 pw: do not move /home/$user to /usr/home
When adding a user, pw will create the path to the home directory
if needed.  However, if creating a path with just one component,
i.e.  that appears to be in the root directory, pw would create the
directory in /usr, and create a symlink from the root directory.
Most commonly, this meant that the default of /home/$user would turn
into /usr/home/$user.  This was added in a self-described kludge 26
years ago.  It made (some) sense when root was generally a small
partition, with most of the space in /usr.  However, the default is
now one large partition.  /home really doesn't belong under /usr,
and anyone who wants to use /usr/home can specify it explicitly.
Remove the kludge to move /home under /usr and create the symlink,
and just use the specified path.  Note that this operation was
done only on the first invocation for a path, and this happened most
commonly when adding a user during the install.

Modify the test that checked for the creation of the symlink to
verify that the symlink is *not* made, but rather a directory.
Add a test that intermediate directories are still created.

Reviewed by:	rgrimes, bapt
Differential Revision:	https://reviews.freebsd.org/D40085
2023-05-23 07:17:42 -05:00
..
crypt.c pw should sanitize the argument of -w. 2016-07-13 17:09:20 +00:00
group
helper_functions.shin Add minimum regression tests for pw -R 2015-07-12 09:42:10 +00:00
Makefile Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
master.passwd
pw-modified.conf Fix setting uid/gid min/max via pw 2015-06-07 20:59:59 +00:00
pw.conf Fix generating configuration file 2015-06-07 20:44:06 +00:00
pw_config_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_etcdir_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_groupadd_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_groupdel_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_groupmod_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_groupshow_test.sh pw: add some basic testcases for groupshow and usershow 2017-05-28 02:15:57 +00:00
pw_lock_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_useradd_test.sh pw: do not move /home/$user to /usr/home 2023-05-23 07:17:42 -05:00
pw_userdel_test.sh Put OPIE to rest. 2022-10-02 03:37:29 +02:00
pw_usermod_test.sh pw usermod: Properly deal with empty secondary group lists (-G '') 2017-08-19 00:19:23 +00:00
pw_usernext_test.sh Rename tests from <foo> to <foo>_test to match the FreeBSD test suite 2017-03-23 03:28:24 +00:00
pw_usershow_test.sh pw: add some basic testcases for groupshow and usershow 2017-05-28 02:15:57 +00:00