diff options
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 5fd3671..6db509a 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -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 */ } |