about summary refs log tree commit diff
path: root/shared/systemd/src/basic/fs-util.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-06-28 18:59:08 +0200
committerMichael Biebl <biebl@debian.org>2020-06-28 18:59:08 +0200
commit215112eefc83274273a10d9ddb5e107c9beec548 (patch)
treea16052cef4bb8707d6a906dd784a50c75945d03e /shared/systemd/src/basic/fs-util.h
parent5ed4e66e01b005212aee22c255c9c6b2a4b040a9 (diff)
parenta54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (diff)
Update upstream source from tag 'upstream/1.25.90'
Update to upstream version '1.25.90'
with Debian dir 16d4caa71e8ba8c27ee163c88f11456b6cdc0490
Diffstat (limited to 'shared/systemd/src/basic/fs-util.h')
-rw-r--r--shared/systemd/src/basic/fs-util.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/shared/systemd/src/basic/fs-util.h b/shared/systemd/src/basic/fs-util.h
index 6b9ade2e..b184570f 100644
--- a/shared/systemd/src/basic/fs-util.h
+++ b/shared/systemd/src/basic/fs-util.h
@@ -40,6 +40,7 @@ int fchmod_umask(int fd, mode_t mode);
 int fchmod_opath(int fd, mode_t m);
 
 int fd_warn_permissions(const char *path, int fd);
+int stat_warn_permissions(const char *path, const struct stat *st);
 
 #define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
 
@@ -82,7 +83,7 @@ enum {
         CHASE_SAFE        = 1 << 3, /* Return EPERM if we ever traverse from unprivileged to privileged files or directories */
         CHASE_TRAIL_SLASH = 1 << 4, /* Any trailing slash will be preserved */
         CHASE_STEP        = 1 << 5, /* Just execute a single step of the normalization */
-        CHASE_NOFOLLOW    = 1 << 6, /* Do not follow the path's right-most compontent. With ret_fd, when the path's
+        CHASE_NOFOLLOW    = 1 << 6, /* Do not follow the path's right-most component. With ret_fd, when the path's
                                      * right-most component refers to symlink, return O_PATH fd of the symlink. */
         CHASE_WARN        = 1 << 7, /* Emit an appropriate warning when an error is encountered */
 };
@@ -113,7 +114,13 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(char*, unlink_and_free);
 int access_fd(int fd, int mode);
 
 void unlink_tempfilep(char (*p)[]);
-int unlinkat_deallocate(int fd, const char *name, int flags);
+
+typedef enum UnlinkDeallocateFlags {
+        UNLINK_REMOVEDIR = 1 << 0,
+        UNLINK_ERASE     = 1 << 1,
+} UnlinkDeallocateFlags;
+
+int unlinkat_deallocate(int fd, const char *name, UnlinkDeallocateFlags flags);
 
 int fsync_directory_of_file(int fd);
 int fsync_full(int fd);
@@ -122,3 +129,5 @@ int fsync_path_at(int at_fd, const char *path);
 int syncfs_path(int atfd, const char *path);
 
 int open_parent(const char *path, int flags, mode_t mode);
+
+int path_is_encrypted(const char *path);