diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-10-22 10:09:20 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-10-22 17:51:26 +0200 |
commit | 8eeb870971b86f1d7f39b3cb4cc18c8bf594320f (patch) | |
tree | eabaa25814121d1992ae598e040a535b8716eb8f /src/basic/fileio.h | |
parent | fs-util: tweak how openat_report_new() operates when O_CREAT is used on a dan... (diff) | |
download | systemd-8eeb870971b86f1d7f39b3cb4cc18c8bf594320f.tar.xz systemd-8eeb870971b86f1d7f39b3cb4cc18c8bf594320f.zip |
fileio: port write_string_file() to LabelOps, and thus add WRITE_STRING_FILE_LABEL flag
Given that we have the LabelOps abstraction these days, we can teach
write_string_file() to use it, which means we can get rid of
fileio-label.[ch] as a separate concept.
(The only reason that fileio-label.[ch] exists independently of
fileio.[ch] was that the former linekd to libselinux potentially, and
thus had to be in src/shared/ while the other always was in src/basic/.
But the LabelOps vtable provides us with a nice work-around)
Diffstat (limited to 'src/basic/fileio.h')
-rw-r--r-- | src/basic/fileio.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/basic/fileio.h b/src/basic/fileio.h index dc514e3ccc..8f54491c12 100644 --- a/src/basic/fileio.h +++ b/src/basic/fileio.h @@ -28,11 +28,7 @@ typedef enum { WRITE_STRING_FILE_MODE_0600 = 1 << 10, WRITE_STRING_FILE_MODE_0444 = 1 << 11, WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL = 1 << 12, - - /* And before you wonder, why write_string_file_atomic_label_ts() is a separate function instead of just one - more flag here: it's about linking: we don't want to pull -lselinux into all users of write_string_file() - and friends. */ - + WRITE_STRING_FILE_LABEL = 1 << 13, } WriteStringFileFlags; typedef enum { |