summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 01:47:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 01:47:24 +0000
commitc9f6d77e4f2913a801cdd7cd4c1d3b7cbb2e1e05 (patch)
treef61d58c398770e3ccd073bff25f2160952d7c2f0 /src
parent6f13cd197540af0bf5e87f87ab0e03548d9c5f64 (diff)
downloads6-linux-init-c9f6d77e4f2913a801cdd7cd4c1d3b7cbb2e1e05.tar.xz
Bugfix: in s6-linux-init-maker, mkdir -p shouldn't chown existing dirs
Diffstat (limited to 'src')
-rw-r--r--src/init/s6-linux-init-maker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init/s6-linux-init-maker.c b/src/init/s6-linux-init-maker.c
index 5478a26..365a556 100644
--- a/src/init/s6-linux-init-maker.c
+++ b/src/init/s6-linux-init-maker.c
@@ -270,7 +270,7 @@ static void auto_dir_internal (char const *base, char const *dir, uid_t uid, gid
{
if (errno != EEXIST || strict) goto err ;
}
- if (uid || gid)
+ else if (uid || gid)
{
if (chown(fn, uid, gid) < 0
|| chmod(fn, mode) < 0) goto err ;