summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-12-08 19:13:02 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-12-08 19:13:02 +0000
commitf13cdf2fa9609644dd0556669889e8c83fa053ff (patch)
tree960dee07ab3551abd8b52368de9eeb925b806374 /src/init
parentc203b45fb689596c509dca981f39e79b455796fe (diff)
downloads6-linux-init-f13cdf2fa9609644dd0556669889e8c83fa053ff.tar.xz
Don't guard chown, so non-root invocation can fail as expected
Diffstat (limited to 'src/init')
-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 ff2caf5..ccf1f08 100644
--- a/src/init/s6-linux-init-maker.c
+++ b/src/init/s6-linux-init-maker.c
@@ -275,7 +275,7 @@ static void auto_dir_internal (char const *base, char const *dir, uid_t uid, gid
}
else
{
- if ((uid || gid) && chown(fn, uid, gid) < 0) goto err ;
+ if (chown(fn, uid, gid) < 0) goto err ;
if (mode & 07000 && chmod(fn, mode) < 0) goto err ;
}
return ;