X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fstat-util.c;h=9dbdae0a0397d4df6fd9fa93da884e0da3285a20;hp=0c3fbc8e1b3bf56300fa20422cb62cd556b67e98;hb=9b00a533195b7fec54a791ca02090e0799214770;hpb=277d0c5729bd21cd925596d4ca806c32aa7c8db5 diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 0c3fbc8e1..9dbdae0a0 100644 --- a/src/basic/stat-util.c +++ b/src/basic/stat-util.c @@ -212,7 +212,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|O_CLOEXEC|O_NOCTTY); + fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_PATH); if (fd < 0) return -errno; @@ -237,7 +237,7 @@ int fd_is_temporary_fs(int fd) { int path_is_temporary_fs(const char *path) { _cleanup_close_ int fd = -1; - fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY); + fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_PATH); if (fd < 0) return -errno;