diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-12-08 19:13:02 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-12-08 19:13:02 +0000 |
commit | f13cdf2fa9609644dd0556669889e8c83fa053ff (patch) | |
tree | 960dee07ab3551abd8b52368de9eeb925b806374 /src/init/s6-linux-init-maker.c | |
parent | c203b45fb689596c509dca981f39e79b455796fe (diff) | |
download | s6-linux-init-f13cdf2fa9609644dd0556669889e8c83fa053ff.tar.xz |
Don't guard chown, so non-root invocation can fail as expected
Diffstat (limited to 'src/init/s6-linux-init-maker.c')
-rw-r--r-- | src/init/s6-linux-init-maker.c | 2 |
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 ; |