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/debug-generator/debug-generator.c | |
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/debug-generator/debug-generator.c')
-rw-r--r-- | src/debug-generator/debug-generator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c index 98670a6c90..664d57d452 100644 --- a/src/debug-generator/debug-generator.c +++ b/src/debug-generator/debug-generator.c @@ -7,7 +7,7 @@ #include "dropin.h" #include "errno-util.h" #include "fd-util.h" -#include "fileio-label.h" +#include "fileio.h" #include "generator.h" #include "initrd-util.h" #include "parse-util.h" @@ -206,7 +206,7 @@ static int process_unit_credentials(const char *credentials_dir) { if (!p) return log_oom(); - r = write_string_file_at_label(AT_FDCWD, p, d, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC|WRITE_STRING_FILE_MKDIR_0755); + r = write_string_file(p, d, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC|WRITE_STRING_FILE_MKDIR_0755|WRITE_STRING_FILE_LABEL); if (r < 0) { log_warning_errno(r, "Failed to write unit file '%s' from credential '%s', ignoring: %m", unit, de->d_name); |