Message ID | 97ed64c94563e960eb3443bcbc164ce167662e2e.1543294426.git.misono.tomohiro@jp.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: sub: Relax the privileges of "subvolume list/show" | expand |
diff --git a/utils.c b/utils.c index 3a4bc92a..8ce8417d 100644 --- a/utils.c +++ b/utils.c @@ -2054,6 +2054,9 @@ int find_mount_root(const char *path, char **mount_root) char *longest_match = NULL; fd = open(path, O_RDONLY | O_NOATIME); + if (fd < 0 && errno == EPERM) + fd = open(path, O_RDONLY); + if (fd < 0) return -errno; close(fd);