summaryrefslogtreecommitdiffhomepage
path: root/test/util/fs_util.h
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2020-08-26 10:03:46 -0700
committerAndrei Vagin <avagin@gmail.com>2020-09-09 17:53:10 -0700
commit2a322c451e0a04df55d8fa4ea6e055da39231efa (patch)
tree0c4a80d1db58c46d15c8569359356d387e9db67a /test/util/fs_util.h
parent5116c7be8d64934980937113870a8fbc82b14ea0 (diff)
tmpfs: Allow xattrs in the trusted namespace if creds has CAP_SYS_ADMIN.
This is needed to support the overlay opaque attribute. PiperOrigin-RevId: 328552985
Diffstat (limited to 'test/util/fs_util.h')
-rw-r--r--test/util/fs_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/util/fs_util.h b/test/util/fs_util.h
index 8cdac23a1..044190657 100644
--- a/test/util/fs_util.h
+++ b/test/util/fs_util.h
@@ -17,6 +17,7 @@
#include <dirent.h>
#include <sys/stat.h>
+#include <sys/statfs.h>
#include <sys/types.h>
#include <unistd.h>
@@ -178,6 +179,11 @@ std::string CleanPath(absl::string_view path);
// Returns the full path to the executable of the given pid or a PosixError.
PosixErrorOr<std::string> ProcessExePath(int pid);
+#ifndef __fuchsia__
+// IsTmpfs returns true if the file at path is backed by tmpfs.
+PosixErrorOr<bool> IsTmpfs(const std::string& path);
+#endif // __fucshia__
+
namespace internal {
// Not part of the public API.
std::string JoinPathImpl(std::initializer_list<absl::string_view> paths);