]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/main.c
label: Introduce LabelOps to do pre/post labelling operations
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 26 Mar 2023 16:20:41 +0000 (18:20 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 31 May 2023 11:15:53 +0000 (13:15 +0200)
commita452c807a447121ce4ba100863cdc4fb81cde047
tree7a4f45b84a5dc321514e89bf41d4e2c8ce117e14
parent0690160e2c8700f773a3b7b14f3b538b82c95dff
label: Introduce LabelOps to do pre/post labelling operations

By default, label_ops is initialized with a NULL pointer which translates
to noop labelling operations. In mac_selinux_init() and the new mac_smack_init(),
we initialize label_ops with a MAC specific LabelOps pointer.

We also introduce mac_init() to initialize any configured MACs and replace all
usages of mac_selinux_init() with mac_init().
25 files changed:
src/basic/label.c [new file with mode: 0644]
src/basic/label.h [new file with mode: 0644]
src/basic/meson.build
src/core/main.c
src/hostname/hostnamed.c
src/hwdb/hwdb.c
src/locale/localed.c
src/login/logind.c
src/login/user-runtime-dir.c
src/machine/machinectl.c
src/resolve/resolved.c
src/shared/label-util.c
src/shared/label-util.h
src/shared/selinux-util.c
src/shared/smack-util.c
src/shared/smack-util.h
src/systemctl/systemctl-edit.c
src/sysusers/sysusers.c
src/test/udev-rule-runner.c
src/timedate/timedated.c
src/tmpfiles/tmpfiles.c
src/udev/udevadm.c
src/udev/udevd.c
src/update-done/update-done.c
src/user-sessions/user-sessions.c