diff options
-rw-r--r-- | src/basic/stat-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 5663a29cd6..848572687e 100644 --- a/src/basic/stat-util.c +++ b/src/basic/stat-util.c @@ -204,7 +204,7 @@ int fd_check_fstype(int fd, statfs_f_type_t magic_value) { int path_check_fstype(const char *path, statfs_f_type_t magic_value) { _cleanup_close_ int fd = -1; - fd = open(path, O_RDONLY); + fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY); if (fd < 0) return -errno; |