summaryrefslogtreecommitdiffstats
path: root/pw/pw_user.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-08-21 09:28:20 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-08-21 09:28:20 +0000
commit310937fee1f84f07d1175c78733da51de818f46e (patch)
tree78eb21bf24ac379f7ace4059cb59118228499bba /pw/pw_user.c
parent0eb538dcc100241473d7bc507f83a1dd45683b8c (diff)
downloadpw-darwin-310937fee1f84f07d1175c78733da51de818f46e.tar.gz
pw-darwin-310937fee1f84f07d1175c78733da51de818f46e.tar.zst
pw-darwin-310937fee1f84f07d1175c78733da51de818f46e.zip
Fix /home symlink creation
Add regression test about it
Diffstat (limited to 'pw/pw_user.c')
-rw-r--r--pw/pw_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 35eb1fb..61d468a 100644
--- a/pw/pw_user.c
+++ b/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);
}