diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-12-04 07:25:12 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-12-04 07:25:12 +0000 |
commit | 5a318ce649a7a5f754892518a4452a519b41dac8 (patch) | |
tree | ad4a8447fd8dc6cce82c1586bbb62566ea8f7e93 /src/libs6/ftrigw_fifodir_make.c | |
parent | ffb0a8fd2045bb8f7f097905cb9d0814803c6060 (diff) | |
download | s6-5a318ce649a7a5f754892518a4452a519b41dac8.tar.gz s6-5a318ce649a7a5f754892518a4452a519b41dac8.tar.xz s6-5a318ce649a7a5f754892518a4452a519b41dac8.zip |
Big signal/command semantics change to svscan/supervise; add s6-svperms.
Diffstat (limited to 'src/libs6/ftrigw_fifodir_make.c')
-rw-r--r-- | src/libs6/ftrigw_fifodir_make.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs6/ftrigw_fifodir_make.c b/src/libs6/ftrigw_fifodir_make.c index 86e9310..df12e25 100644 --- a/src/libs6/ftrigw_fifodir_make.c +++ b/src/libs6/ftrigw_fifodir_make.c @@ -8,7 +8,7 @@ int ftrigw_fifodir_make (char const *path, gid_t gid, int force) { mode_t m = umask(0) ; - if (mkdir(path, 0700) == -1) + if (mkdir(path, 0700) < 0) { struct stat st ; umask(m) ; @@ -19,7 +19,7 @@ int ftrigw_fifodir_make (char const *path, gid_t gid, int force) if (!force) return 1 ; } else umask(m) ; - if ((gid != (gid_t)-1) && (chown(path, -1, gid) == -1)) return 0 ; - if (chmod(path, (gid != (gid_t)-1) ? 03730 : 01733) == -1) return 0 ; + if ((gid != (gid_t)-1) && (chown(path, -1, gid) < 0)) return 0 ; + if (chmod(path, gid != (gid_t)-1 ? 03730 : 01733) < 0) return 0 ; return 1 ; } |