mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Change /home symbolic link, so it will point to usr/home instead of /usr/home.
Previous symlink was confusing: # cd /jails/virtual_system_1/home # realpath . /usr/home ...and slower. OK'ed by: rwatson, phk
This commit is contained in:
parent
a26ee70316
commit
49630c2335
1 changed files with 5 additions and 1 deletions
|
|
@ -183,7 +183,11 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
|
|||
strncat(dbuf, cnf->home, MAXPATHLEN-5);
|
||||
if (mkdir(dbuf, 0755) != -1 || errno == EEXIST) {
|
||||
chown(dbuf, 0, 0);
|
||||
symlink(dbuf, cnf->home);
|
||||
/*
|
||||
* Skip first "/" and create symlink:
|
||||
* /home -> usr/home
|
||||
*/
|
||||
symlink(dbuf+1, cnf->home);
|
||||
}
|
||||
/* If this falls, fall back to old method */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue