fileio: port write_string_file() to LabelOps, and thus add WRITE_STRING_FILE_LABEL...
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 08:09:20 +0000 (10:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 15:51:26 +0000 (17:51 +0200)
commit8eeb870971b86f1d7f39b3cb4cc18c8bf594320f
treeeabaa25814121d1992ae598e040a535b8716eb8f
parent4946dd4197efee693432b3ddff56f30205d3bdfd
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)
13 files changed:
src/basic/fileio.c
src/basic/fileio.h
src/core/unit-serialize.c
src/core/unit.c
src/debug-generator/debug-generator.c
src/hostname/hostnamed.c
src/locale/localed-util.c
src/login/logind-dbus.c
src/shared/dropin.c
src/shared/fileio-label.c
src/shared/fileio-label.h
src/timedate/timedated.c
src/update-done/update-done.c