diff options
author | bapt <bapt@FreeBSD.org> | 2015-08-21 09:28:20 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-08-21 09:28:20 +0000 |
commit | d36fba16cb50756297edd49fb9e633dd34772cde (patch) | |
tree | 05aae6c0c6bccfb5187557e071f84eb5038a980d /usr.sbin/pw/pw_user.c | |
parent | ae89183402f4643d960bca1315e1c423e217414f (diff) | |
download | FreeBSD-src-d36fba16cb50756297edd49fb9e633dd34772cde.zip FreeBSD-src-d36fba16cb50756297edd49fb9e633dd34772cde.tar.gz |
Fix /home symlink creation
Add regression test about it
Diffstat (limited to 'usr.sbin/pw/pw_user.c')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 35eb1fb..61d468a 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -123,7 +123,7 @@ mkdir_home_parents(int dfd, const char *dir) errx(EX_UNAVAILABLE, "out of memory"); if (mkdirat(dfd, tmp, _DEF_DIRMODE) != -1 || errno == EEXIST) { fchownat(dfd, tmp, 0, 0, 0); - symlinkat(tmp, dfd, dirs + 1); + symlinkat(tmp, dfd, dirs); } free(tmp); } |