From f13cdf2fa9609644dd0556669889e8c83fa053ff Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 8 Dec 2019 19:13:02 +0000 Subject: Don't guard chown, so non-root invocation can fail as expected --- src/init/s6-linux-init-maker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ; -- cgit v1.2.3