]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: embed dlopen notes into individual executables
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Jul 2026 13:08:46 +0000 (22:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 Jul 2026 07:35:19 +0000 (16:35 +0900)
Previously, when a library was dynamically loaded via a helper function
inside libsystemd-shared.so, the resulting dlopen ELF note was not
propagated to the invoking executable's ELF metadata.

This commit explicitly annotates each executable with the relevant
dlopen ELF notes for any optional dependencies it might potentially
load. This ensures that package managers and build systems can properly
discover runtime dependencies that are triggered indirectly.

87 files changed:
src/analyze/analyze.c
src/bless-boot/bless-boot.c
src/bootctl/bootctl.c
src/core/executor.c
src/core/main.c
src/coredump/coredump.c
src/coredump/coredumpctl.c
src/creds/creds.c
src/cryptenroll/cryptenroll.c
src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-fido2.c
src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-pkcs11.c
src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c
src/cryptsetup/cryptsetup.c
src/debug-generator/debug-generator.c
src/dissect/dissect.c
src/firstboot/firstboot.c
src/fstab-generator/fstab-generator.c
src/getty-generator/getty-generator.c
src/gpt-auto-generator/gpt-auto-generator.c
src/growfs/growfs.c
src/growfs/makefs.c
src/home/homectl.c
src/home/homed.c
src/home/homework.c
src/hostname/hostnamed.c
src/hwdb/hwdb.c
src/import/export.c
src/import/import-fs.c
src/import/import-generator.c
src/import/import.c
src/import/importd.c
src/import/pull.c
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-upload.c
src/journal/bsod.c
src/journal/journalctl.c
src/journal/journald.c
src/kernel-install/kernel-install.c
src/locale/localed.c
src/login/loginctl.c
src/login/logind.c
src/login/user-runtime-dir.c
src/machine-id-setup/machine-id-setup-main.c
src/machine/machinectl.c
src/machine/machined.c
src/measure/measure-tool.c
src/modules-load/modules-load.c
src/mount/mount-tool.c
src/mountfsd/mountwork.c
src/mstack/mstack-tool.c
src/network/generator/network-generator-main.c
src/network/networkctl.c
src/network/networkd.c
src/nspawn/meson.build
src/nspawn/nspawn.c
src/pcrextend/pcrextend.c
src/pcrlock/pcrlock.c
src/portable/portabled.c
src/pstore/pstore.c
src/remount-fs/remount-fs.c
src/repart/repart.c
src/resolve/resolvectl.c
src/resolve/resolved.c
src/shutdown/shutdown.c
src/socket-activate/socket-activate.c
src/ssh-generator/ssh-generator.c
src/sysext/sysext.c
src/sysinstall/sysinstall.c
src/systemctl/systemctl-main.c
src/sysupdate/sysupdate.c
src/sysusers/sysusers.c
src/timedate/timedated.c
src/tmpfiles/tmpfiles.c
src/tpm2-setup/tpm2-clear.c
src/tpm2-setup/tpm2-generator.c
src/tpm2-setup/tpm2-setup.c
src/tpm2-setup/tpm2-swtpm.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/udevadm.c
src/update-done/update-done.c
src/update-utmp/update-utmp.c
src/user-sessions/user-sessions.c
src/userdb/userdbctl.c
src/veritysetup/veritysetup.c
src/vmspawn/vmspawn.c
src/volatile-root/volatile-root.c

index 67a91357675034a94ad18375094357e37ae3de6a..df41db77ad6664095bc74ea7ab61430a005f68da 100644 (file)
@@ -55,6 +55,7 @@
 #include "bus-util.h"
 #include "calendarspec.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "format-table.h"
 #include "help-util.h"
@@ -685,6 +686,20 @@ static int run(int argc, char *argv[]) {
         _cleanup_strv_free_ char **args = NULL;
         int r;
 
+        LIBACL_NOTE(recommended);
+        LIBAPPARMOR_NOTE(recommended);
+        LIBAUDIT_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBBPF_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(recommended);
+        LIBDW_NOTE(suggested);
+        LIBELF_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBPCRE2_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         setlocale(LC_ALL, "");
         setlocale(LC_NUMERIC, "C"); /* we want to format/parse floats in C style */
 
index 4242182ac10b42b3db5c855119fbff4a8a064d6f..6e31ea72f03fd2e52587945cc50a79bcc848c7be 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "build.h"
 #include "devnum-util.h"
+#include "dlopen-note.h"
 #include "efivars.h"
 #include "fd-util.h"
 #include "find-esp.h"
@@ -566,6 +567,8 @@ static int run(int argc, char *argv[]) {
         char **args = NULL;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+
         log_setup();
 
         r = parse_argv(argc, argv, &args);
index 6e522f01e6a98cb423968c10093449b139f128aa..72d96bc1b0ea9ea8ccd039760fa197870e920027 100644 (file)
@@ -22,6 +22,7 @@
 #include "crypto-util.h"
 #include "devnum-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "efi-loader.h"
 #include "efivars.h"
 #include "escape.h"
@@ -858,6 +859,13 @@ static int run(int argc, char *argv[]) {
         _cleanup_(umount_and_freep) char *mounted_dir = NULL;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBTSS2_ESYS_NOTE(suggested);
+        LIBTSS2_MU_NOTE(suggested);
+        LIBTSS2_RC_NOTE(suggested);
+
         log_setup();
 
         char **args = NULL;
index e771bdc02438f57860bc884852d955399a9235b1..d0cd16aa9abe938f78aad835442697c597914809 100644 (file)
@@ -9,6 +9,7 @@
 #include "build.h"
 #include "capability-util.h"
 #include "cgroup.h"
+#include "dlopen-note.h"
 #include "dynamic-user.h"
 #include "exec-invoke.h"
 #include "execute.h"
@@ -232,6 +233,12 @@ static int run(int argc, char *argv[]) {
 int run_executor(int argc, char *argv[]) {
         int r;
 
+        LIBACL_NOTE(recommended);
+        LIBAPPARMOR_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         /* We use safe_fork() for spawning sd-pam helper process, which internally calls rename_process().
          * As the last step of renaming, all saved argvs are memzero()-ed. Hence, we need to save the argv
          * first to prevent showing "intense" cmdline. See #30352. */
index a05715dcfce6d54dd1cb0dd05ab4ccaebf6abfce..84e6c75bef758a1e0662e802e9c4367b20740765 100644 (file)
@@ -41,6 +41,7 @@
 #include "dbus.h"
 #include "dbus-manager.h"
 #include "dev-setup.h"
+#include "dlopen-note.h"
 #include "efi-random.h"
 #include "emergency-action.h"
 #include "env-util.h"
@@ -4018,6 +4019,18 @@ finish:
 }
 
 int main(int argc, char *argv[]) {
+        LIBACL_NOTE(recommended);
+        LIBAPPARMOR_NOTE(recommended);
+        LIBAUDIT_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBBPF_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(recommended);
+        LIBKMOD_NOTE(recommended);
+        LIBPCRE2_NOTE(suggested);
+        LIBSECCOMP_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
 #if SYSTEMD_MULTICALL_BINARY
         if (invoked_as(argv, "executor"))
                 return run_executor(argc, argv);
index 6a758ac2770460b6cfb0d84d30434e4d59231499..649756d3326acd300d734300d6907ffcaf4387d2 100644 (file)
@@ -6,6 +6,7 @@
 #include "coredump-kernel-helper.h"
 #include "coredump-receive.h"
 #include "coredump-util.h"
+#include "dlopen-note.h"
 #include "log.h"
 #include "main-func.h"
 #include "string-util.h"
 static int run(int argc, char *argv[]) {
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBACL_NOTE(recommended);
+        LIBDW_NOTE(suggested);
+        LIBELF_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         /* When running as backtrace mode, it is not necessary to use kmsg, not necessary to disable coredump
          * from the command, and unexpectedly passed file descriptors can be silently ignored. */
         if (streq_ptr(argv[1], "--backtrace"))
index c13cfa1cce13635192714b5505df3c33e74ea88a..d69137466bdebf379952f214fb0a814b4436a2a8 100644 (file)
@@ -21,6 +21,7 @@
 #include "chase.h"
 #include "compress.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "escape.h"
 #include "extract-word.h"
@@ -1489,6 +1490,13 @@ static int run(int argc, char *argv[]) {
         char **args = NULL;
         int r, units_active;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBACL_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index 455b157a02c3a94706c841069e5b8b77ccf4b5bf..d559b59e6b24035ab7ea5bb9da90f24c1312e403 100644 (file)
@@ -12,6 +12,7 @@
 #include "bus-util.h"
 #include "creds-util.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "escape.h"
 #include "fileio.h"
@@ -1467,6 +1468,9 @@ static int vl_server(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBCRYPTO_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         char **args = NULL;
index 1b5bbc3016fb930701aaebd0f3a6cf1e4d156e33..ae708146615d2eeb40221d5cfea84e06dd993425 100644 (file)
@@ -21,6 +21,7 @@
 #include "cryptenroll-varlink.h"
 #include "cryptenroll-wipe.h"
 #include "cryptsetup-util.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "format-table.h"
 #include "help-util.h"
@@ -1019,6 +1020,13 @@ static int run(int argc, char *argv[]) {
         _cleanup_(enroll_context_done) EnrollContext c = ENROLL_CONTEXT_NULL;
         int slot, r;
 
+        LIBCRYPTO_NOTE(suggested);
+        LIBFIDO2_NOTE(suggested);
+        LIBP11KIT_NOTE(suggested);
+        LIBQRENCODE_NOTE(suggested);
+        PASSWORD_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         /* A delicious drop of snake oil */
index 800b297ae8470607ad6f08ecd6de41bdbe4d65df..93be8dcb3c8bc9e25fbf59a349169b7a26beca6f 100644 (file)
@@ -8,6 +8,7 @@
 #include "alloc-util.h"
 #include "cryptsetup-token.h"
 #include "cryptsetup-token-util.h"
+#include "dlopen-note.h"
 #include "luks2-fido2.h"
 #include "memory-util.h"
 #include "version.h"
@@ -17,7 +18,9 @@
 #define TOKEN_VERSION_MINOR "0"
 
 /* for libcryptsetup debug purpose */
-_public_ const char *cryptsetup_token_version(void) {
+_public_ const char* cryptsetup_token_version(void) {
+        LIBFIDO2_NOTE(suggested);
+
         return TOKEN_VERSION_MAJOR "." TOKEN_VERSION_MINOR " systemd-v" PROJECT_VERSION_FULL " (" GIT_VERSION ")";
 }
 
index 483686f671e31e4983d54ade709db9e8900ff5c9..3c55866fb28b242df4b585916c17a3a402b338b8 100644 (file)
@@ -7,6 +7,7 @@
 #include "alloc-util.h"
 #include "cryptsetup-token.h"
 #include "cryptsetup-token-util.h"
+#include "dlopen-note.h"
 #include "luks2-pkcs11.h"
 #include "memory-util.h"
 #include "pkcs11-util.h"
 #define TOKEN_VERSION_MINOR "0"
 
 /* for libcryptsetup debug purpose */
-_public_ const char *cryptsetup_token_version(void) {
+_public_ const char* cryptsetup_token_version(void) {
+        LIBCRYPTO_NOTE(suggested);
+        LIBP11KIT_NOTE(suggested);
+
         return TOKEN_VERSION_MAJOR "." TOKEN_VERSION_MINOR " systemd-v" PROJECT_VERSION_FULL " (" GIT_VERSION ")";
 }
 
index dd1cb77d8c384629622a941a0a681853e63f2678..dc67ebeb7aa661eb271054a2b736773d6db2220f 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "cryptsetup-token.h"
 #include "cryptsetup-token-util.h"
+#include "dlopen-note.h"
 #include "hexdecoct.h"
 #include "json-util.h"
 #include "luks2-tpm2.h"
@@ -18,7 +19,9 @@
 #define TOKEN_VERSION_MINOR "0"
 
 /* for libcryptsetup debug purpose */
-_public_ const char *cryptsetup_token_version(void) {
+_public_ const char* cryptsetup_token_version(void) {
+        LIBCRYPTO_NOTE(suggested);
+        TPM2_NOTE(suggested);
 
         return TOKEN_VERSION_MAJOR "." TOKEN_VERSION_MINOR " systemd-v" PROJECT_VERSION_FULL " (" GIT_VERSION ")";
 }
index 9be25d004d740adece02fa8993b3e76c91dd7355..db34b7e97473f641ac6a0951f7bc15995a6ac2ee 100644 (file)
@@ -18,6 +18,7 @@
 #include "cryptsetup-pkcs11.h"
 #include "cryptsetup-tpm2.h"
 #include "cryptsetup-util.h"
+#include "dlopen-note.h"
 #include "efi-api.h"
 #include "efi-loader.h"
 #include "efivars.h"
@@ -2884,6 +2885,12 @@ static int verb_detach(int argc, char *argv[], uintptr_t _data, void *userdata)
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBFIDO2_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBP11KIT_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         umask(0022);
index 700ad528930b3ff86988d674cfab7ed114a40b39..c0c799b06f376367d54be7b7943f5a4ed64abd42 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "bitfield.h"
 #include "creds-util.h"
+#include "dlopen-note.h"
 #include "dropin.h"
 #include "errno-util.h"
 #include "extract-word.h"
@@ -364,6 +365,9 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
         const char *credentials_dir;
         int r;
 
+        LIBCRYPTO_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         assert_se(arg_dest = dest_early);
 
         r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_RD_STRICT | PROC_CMDLINE_STRIP_RD_PREFIX);
index e3db8470b65d2543692bbee3e72723973b016497..352d7ffa919872bd5051423621f56f0b6d375f64 100644 (file)
@@ -19,6 +19,7 @@
 #include "device-util.h"
 #include "discover-image.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "escape.h"
@@ -1968,6 +1969,13 @@ static int run(int argc, char *argv[]) {
         _cleanup_close_ int userns_fd = -EBADF;
         int r;
 
+        LIBACL_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         if (invoked_as(argv, "mount.ddi"))
index e81923beb5bde67f8fc60a2f5582d8c53c334456..55b4f922c1b0e02b682e7f0487c505ac0a6acf7f 100644 (file)
@@ -20,6 +20,7 @@
 #include "copy.h"
 #include "creds-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-file.h"
 #include "errno-util.h"
 #include "fd-util.h"
@@ -1702,6 +1703,14 @@ static int run(int argc, char *argv[]) {
         _cleanup_close_ int rfd = -EBADF;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPT_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+        PASSWORD_NOTE(suggested);
+
         r = parse_argv(argc, argv);
         if (r <= 0)
                 return r;
index 3a5ce47691e0fcec00df6a24a06c7ed76a49ffb8..b723868f5190518cb52adec2c8197a032b870cc5 100644 (file)
@@ -14,6 +14,7 @@
 #include "bus-util.h"
 #include "chase.h"
 #include "creds-util.h"
+#include "dlopen-note.h"
 #include "efi-loader.h"
 #include "env-util.h"
 #include "errno-util.h"
@@ -1729,6 +1730,11 @@ static int run_generator(void) {
 }
 
 static int run(int argc, char **argv) {
+        LIBCRYPTO_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         arg_sysroot_check = invoked_as(argv, "systemd-sysroot-fstab-check");
 
         if (arg_sysroot_check) {
index 69ef0aae04c126564659598eb4cfd98966fa11e1..62e0735dd7b81757e1d2b2877e853492f6441fc3 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "alloc-util.h"
 #include "creds-util.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -277,6 +278,9 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
 
         assert_se(arg_dest = dest);
 
+        LIBCRYPTO_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         if (in_initrd()) {
                 log_debug("Skipping generator, running in the initrd.");
                 return EXIT_SUCCESS;
index b92ac8f66a765762a7f439107331fda1153be3ed..5305957bd93c71ca6cf37a6029b168e77cab4210 100644 (file)
@@ -9,6 +9,7 @@
 #include "device-util.h"
 #include "devnum-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "dropin.h"
 #include "efi-loader.h"
 #include "efivars.h"
@@ -1359,6 +1360,10 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
 static int run(const char *dest, const char *dest_early, const char *dest_late) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         assert_se(arg_dest = dest);
         assert_se(arg_dest_late = dest_late);
 
index f54266a1102a4a71f09e10ad42b25bc142de2a47..e9b34529b526e96f7463686febced39f2ab2739c 100644 (file)
@@ -11,6 +11,7 @@
 #include "device-util.h"
 #include "devnum-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "fd-util.h"
 #include "format-table.h"
 #include "format-util.h"
@@ -192,6 +193,8 @@ static int run(int argc, char *argv[]) {
         dev_t devno;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+
         log_setup();
 
         r = parse_argv(argc, argv);
index 3747bc0ee2888d3fea405e32db757ed9434c9b73..26d3f5a4bfdd8d6aa875fe4c0a09ea935c60ca46 100644 (file)
@@ -7,6 +7,7 @@
 #include "alloc-util.h"
 #include "blockdev-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "fd-util.h"
 #include "log.h"
 #include "main-func.h"
@@ -20,6 +21,9 @@ static int run(int argc, char *argv[]) {
         struct stat st;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         if (argc != 3)
index 84e3ea12053d95e67b0ea84474d65f32458ba389..f4be3c0e70276b694665eba13b5270906c731ef8 100644 (file)
@@ -19,6 +19,7 @@
 #include "creds-util.h"
 #include "crypto-util.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "dns-domain.h"
 #include "env-util.h"
 #include "errno-util.h"
@@ -5183,6 +5184,12 @@ static int run(int argc, char *argv[]) {
         char **args = NULL;
         int r;
 
+        LIBCRYPT_NOTE(recommended);
+        LIBFIDO2_NOTE(suggested);
+        LIBP11KIT_NOTE(suggested);
+        LIBQRENCODE_NOTE(suggested);
+        PASSWORD_NOTE(suggested);
+
         log_setup();
 
         r = redirect_bus_mgr();
index 753aa95eb3f8f63b1371685fb1257f2813320518..fc573c5f786e69e5bab419c8c971a2fca382c506 100644 (file)
@@ -7,6 +7,7 @@
 #include "bus-log-control-api.h"
 #include "bus-object.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "homed-manager.h"
 #include "homed-manager-bus.h"
 #include "log.h"
@@ -18,6 +19,9 @@ static int run(int argc, char *argv[]) {
         _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
         int r;
 
+        LIBCRYPT_NOTE(recommended);
+        PASSWORD_NOTE(suggested);
+
         log_setup();
 
         r = service_parse_argv("systemd-homed.service",
index 81775e887261c1b13d586d3e74af87e0f6dc861d..7e48f012069776f3a4b3c23de29fb509e341cc93 100644 (file)
@@ -13,6 +13,7 @@
 #include "chown-recursive.h"
 #include "copy.h"
 #include "cryptsetup-util.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
@@ -1998,6 +1999,12 @@ static int run(int argc, char *argv[]) {
         sd_json_variant *fdmap, *blob_fd_variant;
         int r;
 
+        LIBCRYPT_NOTE(recommended);
+        LIBFIDO2_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBP11KIT_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         start = now(CLOCK_MONOTONIC);
 
         log_setup();
index 99de3f23f6f48ae2308d5d61477ad9f5312a8a31..98ade098a7e78c7807af10c3fd550bdafa21f7f9 100644 (file)
@@ -22,6 +22,7 @@
 #include "daemon-util.h"
 #include "device-private.h"
 #include "device-util.h"
+#include "dlopen-note.h"
 #include "env-file.h"
 #include "env-util.h"
 #include "extract-word.h"
@@ -2659,6 +2660,8 @@ static int run(int argc, char *argv[]) {
         };
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = service_parse_argv("systemd-hostnamed.service",
index 4d2d6fe8c48d94479d4ed34d4d1f94305a24e2ad..c172153bc2af1dcbc6cd155cd1fa5d71df462ab5 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "alloc-util.h"
 #include "build.h"
+#include "dlopen-note.h"
 #include "format-table.h"
 #include "hwdb-util.h"
 #include "label-util.h"
@@ -114,6 +115,8 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         char **args = NULL;
index 0b6d27b9ffa8d1448cdfb6562b5b400183840b8b..2e1576c467dd039cc2a98537f5427d16e86c1e04 100644 (file)
@@ -9,6 +9,7 @@
 #include "ansi-color.h"
 #include "build.h"
 #include "discover-image.h"
+#include "dlopen-note.h"
 #include "export-raw.h"
 #include "export-tar.h"
 #include "fd-util.h"
@@ -282,6 +283,9 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        ARCHIVE_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index dcb0f8c511a3d4ac01ef71d8e1af91d1a3c85879..fd54faefc025a7092b8c5d6ba5a51bf17ebdda8e 100644 (file)
@@ -9,6 +9,7 @@
 #include "build.h"
 #include "copy.h"
 #include "discover-image.h"
+#include "dlopen-note.h"
 #include "fd-util.h"
 #include "format-table.h"
 #include "format-util.h"
@@ -392,6 +393,8 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index f176492a54c93996349ce069040f45cdb1bb9999..46b605b995d8bfe7f7a474ce56db72455214e592 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "creds-util.h"
 #include "discover-image.h"
+#include "dlopen-note.h"
 #include "efivars.h"
 #include "errno-util.h"
 #include "extract-word.h"
@@ -426,6 +427,9 @@ static int generate(void) {
 static int run(const char *dest, const char *dest_early, const char *dest_late) {
         int r;
 
+        LIBCRYPTO_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         assert_se(arg_dest = dest);
 
         r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_RD_STRICT|PROC_CMDLINE_STRIP_RD_PREFIX);
index 18276fa72d24316807edd25ac95a23c0adbdbd4b..782557a2211569b1d3fbdf981b207031c68d9b57 100644 (file)
@@ -9,6 +9,7 @@
 #include "ansi-color.h"
 #include "build.h"
 #include "discover-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "fd-util.h"
 #include "format-table.h"
@@ -469,6 +470,9 @@ static void parse_env(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        ARCHIVE_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index c329491386cf08139868c3c6e63116d04a95afa7..5220b3ba03fad686aa8adc6f47173b6716424ebc 100644 (file)
@@ -19,6 +19,7 @@
 #include "constants.h"
 #include "daemon-util.h"
 #include "discover-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "event-util.h"
 #include "fd-util.h"
@@ -2081,6 +2082,8 @@ static int run(int argc, char *argv[]) {
         RuntimeScope scope = RUNTIME_SCOPE_SYSTEM;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = service_parse_argv("systemd-importd.service",
index 09294bc6fc57330a1ecff67968225142a109dc88..7fe3a7e4dd655f8384937b497afb4e5549ba9faf 100644 (file)
@@ -9,6 +9,7 @@
 #include "ansi-color.h"
 #include "build.h"
 #include "discover-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "format-table.h"
 #include "hexdecoct.h"
@@ -608,6 +609,10 @@ static void parse_env(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        ARCHIVE_NOTE(recommended);
+        LIBCURL_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index a6ef7c77fa0c42a573c3f959d8201ac4a605ec6a..9def4a3bc9fa0e9ded5c562454b51f35a6b0d8c9 100644 (file)
@@ -1259,6 +1259,9 @@ static int run(int argc, char *argv[]) {
                 MHD_USE_THREAD_PER_CONNECTION;
         int r, n;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBGNUTLS_NOTE(suggested);
+
         log_setup();
 
         r = parse_argv(argc, argv);
index ff283a2ea569154300b379348b497f3e4a41c59d..504471fc8af7a037e28e74079c444b05ba8a148f 100644 (file)
@@ -9,6 +9,7 @@
 #include "build.h"
 #include "conf-parser.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "fd-util.h"
 #include "format-table.h"
@@ -1165,6 +1166,11 @@ static int run(int argc, char **argv) {
         _cleanup_free_ char *cert = NULL, *trust = NULL;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBCRYPTO_NOTE(suggested);
+        LIBGNUTLS_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         journal_auth_init();
index a24f577c892fd80f971feca75eecc6e57bc57ecc..48a8df559ef92b551f31bc922116017af31bf878 100644 (file)
@@ -12,6 +12,7 @@
 #include "conf-parser.h"
 #include "curl-util.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "env-file.h"
 #include "extract-word.h"
 #include "fd-util.h"
@@ -869,6 +870,8 @@ static int run(int argc, char **argv) {
         bool use_journal;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+
         log_setup();
 
         r = parse_config();
index e380e08b1c20cccba1a5e218da7ccd35a160786e..9a9067088c0ed84f71037c0227c3c92cd80b69f3 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "alloc-util.h"
 #include "build.h"
+#include "dlopen-note.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "format-table.h"
@@ -287,6 +288,9 @@ static int run(int argc, char *argv[]) {
         _cleanup_free_ char *message = NULL;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBQRENCODE_NOTE(suggested);
+
         log_setup();
 
         r = parse_argv(argc, argv);
index 71f4f717f424f4b8b535f3d711d84f842a36457b..bb5b376a933d9d4fbdd1d2ed2cd7eb67e970c445 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "build.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "format-table.h"
 #include "glob-util.h"
@@ -1021,6 +1022,14 @@ static int run(int argc, char *argv[]) {
         _cleanup_strv_free_ char **args = NULL;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBACL_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBPCRE2_NOTE(suggested);
+        LIBQRENCODE_NOTE(suggested);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index 91f02178f5012e17c00ac0ca69f0816d99b76398..3cab48f6b7b718346902819fa15ff4995b1ac293 100644 (file)
@@ -6,6 +6,7 @@
 #include "sd-event.h"
 #include "sd-messages.h"
 
+#include "dlopen-note.h"
 #include "format-util.h"
 #include "journal-authenticate.h"
 #include "journald-kmsg.h"
@@ -25,6 +26,12 @@ static int run(int argc, char *argv[]) {
         LogTarget log_target;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBACL_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBPCRE2_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         if (argc > 2)
                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes one or no arguments.");
 
index 132ae803dfdf91252c85ab0333c461eba13ee240..69fdbcfc34ac1dfd0ed06a729fbd5e4ca873189a 100644 (file)
@@ -12,6 +12,7 @@
 #include "chase.h"
 #include "conf-files.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-file.h"
 #include "env-util.h"
 #include "exec-util.h"
@@ -1664,6 +1665,11 @@ static int parse_argv(int argc, char *argv[], char ***remaining_args) {
 static int run(int argc, char* argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         char **args = NULL;
index 4296db6f2f9b4fa9fca9b26397424c8f3d4a8b79..a6ff82ffbc7857a5d892f83dcdf0a5077bd6603d 100644 (file)
@@ -15,6 +15,7 @@
 #include "bus-util.h"
 #include "constants.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "hashmap.h"
 #include "label-util.h"
 #include "localed-util.h"
@@ -632,6 +633,8 @@ static int run(int argc, char *argv[]) {
         _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = service_parse_argv("systemd-localed.service",
index 19ee4c5b75b71dd2bcb43f679b3de03428bf169a..be670254211667250823cbfd63338f2e8505dd65 100644 (file)
@@ -17,6 +17,7 @@
 #include "bus-util.h"
 #include "cgroup-show.h"
 #include "cgroup-util.h"
+#include "dlopen-note.h"
 #include "format-table.h"
 #include "format-util.h"
 #include "help-util.h"
@@ -1661,6 +1662,8 @@ static int run(int argc, char *argv[]) {
         char **args = NULL;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+
         setlocale(LC_ALL, "");
         log_setup();
 
index fb8e841b9d4b1031f4d653b339602777caf1c2fd..9fcf57ab91699ee4317f1b03c0e952c04c131bf6 100644 (file)
@@ -17,6 +17,7 @@
 #include "device-util.h"
 #include "devnum-util.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "escape.h"
 #include "fd-util.h"
@@ -1351,6 +1352,10 @@ static int run(int argc, char *argv[]) {
         _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         int r;
 
+        LIBACL_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         log_set_facility(LOG_AUTH);
         log_setup();
 
index bc522bcbca283235a3350ccdb0833c2844a606e6..728b15f4d3f510d01c7114e88f16214cab590448 100644 (file)
@@ -8,6 +8,7 @@
 #include "bus-error.h"
 #include "bus-locator.h"
 #include "devnum-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "format-util.h"
@@ -327,6 +328,9 @@ static int do_tmpfs_quota(UserRecord *ur) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         if (argc != 3)
index 2363427b5f54e446dadc92652fd8fd7ee072bf26..1eb372be649f1e3a853c7613f81c5c86515ba5ba 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "build.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "format-table.h"
 #include "id128-util.h"
 #include "image-policy.h"
@@ -131,6 +132,12 @@ static int run(int argc, char *argv[]) {
         _cleanup_(umount_and_freep) char *mounted_dir = NULL;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         r = parse_argv(argc, argv);
index b0efb6ec029cf1b69e1c4fae9ff0e72fd1f887b1..dc2381fc84a8a84c28fb3c795909ab6bb14a0b6c 100644 (file)
@@ -26,6 +26,7 @@
 #include "bus-wait-for-jobs.h"
 #include "cgroup-show.h"
 #include "cgroup-util.h"
+#include "dlopen-note.h"
 #include "edit-util.h"
 #include "env-util.h"
 #include "fd-util.h"
@@ -2634,6 +2635,9 @@ static int run(int argc, char *argv[]) {
         _cleanup_strv_free_ char **args = NULL;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBSELINUX_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index 954e26069214ed457291b34572cc715f25c539f7..47b7650caf870323b57f8f7dd87d6834d2feccd3 100644 (file)
@@ -16,6 +16,7 @@
 #include "constants.h"
 #include "daemon-util.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "hash-funcs.h"
@@ -347,6 +348,12 @@ static int run(int argc, char *argv[]) {
         RuntimeScope scope = RUNTIME_SCOPE_SYSTEM;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         log_set_facility(LOG_AUTH);
         log_setup();
 
index 893fd4e593a852bdec4fb0def081b63d30f446a9..b224f95b35e491e9669fd62eb62e9d4c9b4baa71 100644 (file)
@@ -8,6 +8,7 @@
 #include "ask-password-api.h"
 #include "build.h"
 #include "crypto-util.h"
+#include "dlopen-note.h"
 #include "efi-loader.h"
 #include "efivars.h"
 #include "fd-util.h"
@@ -1130,6 +1131,8 @@ static int verb_policy_digest(int argc, char *argv[], uintptr_t _data, void *use
 static int run(int argc, char *argv[]) {
         int r;
 
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         char **args = NULL;
index eb58b70c7b06cad9b0141770c81ebee862b3ed5e..85452f62a5404897f40564da113c282ff67dc51a 100644 (file)
@@ -12,6 +12,7 @@
 #include "conf-files.h"
 #include "constants.h"
 #include "cpu-set-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -390,6 +391,8 @@ static int run(int argc, char *argv[]) {
         char *module;
         int ret = 0, r;
 
+        LIBKMOD_NOTE(required);
+
         char **args = NULL;
         r = parse_argv(argc, argv, &args);
         if (r <= 0)
index c35769e56a7f5dee6bfe0c6ee48c283c78b14306..58b689190d70f9d4afccc58723420f2734eb3e8c 100644 (file)
@@ -14,6 +14,7 @@
 #include "chase.h"
 #include "device-private.h"
 #include "device-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "escape.h"
 #include "fd-util.h"
@@ -1479,6 +1480,8 @@ static int run(int argc, char* argv[]) {
         char **args = NULL;
         int r;
 
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         r = parse_argv(argc, argv, &args);
index 4cd4e4abdd244427740c6ef8f4bd9661cd75168f..af84ace1eb903aee404f00dddc3adbc49cfbc80e 100644 (file)
@@ -15,6 +15,7 @@
 #include "chase.h"
 #include "discover-image.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "escape.h"
@@ -1489,6 +1490,11 @@ static int run(int argc, char *argv[]) {
         unsigned n_iterations = 0;
         int m, listen_fd, r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         m = sd_listen_fds(false);
index 244e7dc682dcd76af9e9312a57514208c11f3f29..45c699d57428ce81c0eda56b21aa3c88a15d1019 100644 (file)
@@ -6,6 +6,7 @@
 #include "argv-util.h"
 #include "build.h"
 #include "chase.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "extract-word.h"
 #include "fd-util.h"
@@ -376,6 +377,11 @@ static int umount_mstack(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         if (invoked_as(argv, "mount.mstack"))
index df9ce9265dbbbd5be0749f5655ec32e96684f1f3..ae15dff2b1023cccb50dc597785ce626a65e7a6b 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "build.h"
 #include "creds-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "format-table.h"
@@ -197,6 +198,8 @@ static int run(int argc, char *argv[]) {
         _cleanup_(context_clear) Context context = {};
         int r, ret = 0;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         umask(0022);
index bf74f10a4a48e0ca046476983e67a44e810e7fbd..f85c74b6afac13aa5c27cac5154fc859746b4701 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "alloc-util.h"
 #include "build.h"
+#include "dlopen-note.h"
 #include "format-table.h"
 #include "help-util.h"
 #include "log.h"
@@ -208,6 +209,9 @@ static int run(int argc, char* argv[]) {
         char **args = NULL;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = parse_argv(argc, argv, &args);
index 230339ba0c7f34abe3dc9a3eead381977ddde81e..9415c090257160248718105da8d001c259701318 100644 (file)
@@ -9,6 +9,7 @@
 #include "bus-object.h"
 #include "capability-util.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "main-func.h"
 #include "mkdir.h"
 #include "networkd-conf.h"
@@ -24,6 +25,15 @@ static int run(int argc, char *argv[]) {
         _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         int r;
 
+        LIBAPPARMOR_NOTE(recommended);
+        LIBAUDIT_NOTE(recommended);
+        LIBIDN2_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+        LIBTSS2_ESYS_NOTE(suggested);
+        LIBTSS2_MU_NOTE(suggested);
+        LIBTSS2_RC_NOTE(suggested);
+
         log_setup();
 
         r = service_parse_argv("systemd-networkd.service",
index ddf859c63d5d096ae6ebe3645ca0e86d51e8754c..366cec23f616382b5d713efc2e97ad79795b1656 100644 (file)
@@ -47,7 +47,11 @@ executables += [
                         executable_template['include_directories'],
                 ],
                 'dependencies' : [
+                        libacl_cflags,
+                        libblkid_cflags,
+                        libcryptsetup_cflags,
                         libmount_cflags,
+                        libopenssl_cflags,
                         libseccomp_cflags,
                         libselinux_cflags,
                 ],
index c4dfc9584ec950d198bc85b3ad6e8006cb0fc651..f4d85c0418d7a0680874b8b7f6942d0fe9f520c9 100644 (file)
 #include "sd-path.h"
 #include "sd-varlink.h"
 
+#include "acl-util.h"
 #include "alloc-util.h"
 #include "barrier.h"
 #include "base-filesystem.h"
+#include "blkid-util.h"
 #include "btrfs-util.h"
 #include "build.h"
 #include "bus-error.h"
 #include "constants.h"
 #include "copy.h"
 #include "cpu-set-util.h"
+#include "crypto-util.h"
+#include "cryptsetup-util.h"
 #include "daemon-util.h"
 #include "dev-setup.h"
 #include "devnum-util.h"
 #include "discover-image.h"
 #include "dissect-image.h"
-#include "dlfcn-util.h"
 #include "env-util.h"
 #include "escape.h"
 #include "ether-addr-util.h"
@@ -6141,6 +6144,10 @@ static int run(int argc, char *argv[]) {
         if (arg_cleanup)
                 return do_cleanup();
 
+        (void) DLOPEN_CRYPTSETUP(LOG_DEBUG, suggested);
+        (void) DLOPEN_LIBACL(LOG_DEBUG, recommended);
+        (void) DLOPEN_LIBBLKID(LOG_DEBUG, recommended);
+        (void) DLOPEN_LIBCRYPTO(LOG_WARNING, recommended);
         (void) DLOPEN_LIBMOUNT(LOG_DEBUG, recommended);
         (void) DLOPEN_LIBSECCOMP(LOG_DEBUG, recommended);
         (void) DLOPEN_LIBSELINUX(LOG_DEBUG, recommended);
index ab212600dfd74c9dd0ea550b7831f37b12ea4db8..693435f3a4e9e281f9cb3afde53ed6f72e745919 100644 (file)
@@ -7,6 +7,7 @@
 #include "alloc-util.h"
 #include "build.h"
 #include "crypto-util.h"
+#include "dlopen-note.h"
 #include "efi-loader.h"
 #include "escape.h"
 #include "format-table.h"
@@ -512,6 +513,9 @@ static int run(int argc, char *argv[]) {
         Tpm2UserspaceEventType event = _TPM2_USERSPACE_EVENT_TYPE_INVALID;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         char **args = NULL;
index d51215d522a010f6ac21dd5beac56c43e5e2755a..2d084d8eb18267dedee9de59bdb876aced5e82a1 100644 (file)
@@ -21,6 +21,7 @@
 #include "copy.h"
 #include "creds-util.h"
 #include "crypto-util.h"
+#include "dlopen-note.h"
 #include "efi-api.h"
 #include "efivars.h"
 #include "env-util.h"
@@ -5698,6 +5699,10 @@ static int vl_method_on_completed_update(sd_varlink *link, sd_json_variant *para
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         r = mac_init();
index 23982c6edef6b9a37578af34ca00aa734503b04b..2a8bdc36c78acd578b7e1d364d36250fcdecf8ef 100644 (file)
@@ -12,6 +12,7 @@
 #include "common-signal.h"
 #include "constants.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "hashmap.h"
 #include "log.h"
 #include "main-func.h"
@@ -143,6 +144,10 @@ static int run(int argc, char *argv[]) {
         RuntimeScope scope = RUNTIME_SCOPE_SYSTEM;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = service_parse_argv("systemd-portabled.service",
index 3e84b25bfb4c15192300bc0aba46b7d4484c0604..35e03a814d14314a122925b184ef7f181596fb6c 100644 (file)
@@ -13,6 +13,7 @@
 #include "conf-parser.h"
 #include "copy.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "iovec-util.h"
@@ -309,6 +310,8 @@ static int run(int argc, char *argv[]) {
         _cleanup_(pstore_entries_reset) PStoreList list = {};
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         if (argc == 3) {
index 698bb80a4fc5ad934e928da9ff0902b2152603a3..1d5457728fe8a349e1502176100e4a81fe56433a 100644 (file)
@@ -5,6 +5,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "exit-status.h"
 #include "format-util.h"
@@ -122,6 +123,8 @@ static int run(int argc, char *argv[]) {
         _cleanup_hashmap_free_ Hashmap *pids = NULL;
         int r;
 
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         if (argc > 1)
index 099b901226d5297545e7cc5386e4648b39e14186..3eada3bc42a9ecf32e9c538c5307272e6d4ff3fd 100644 (file)
@@ -11614,6 +11614,9 @@ static int run(int argc, char *argv[]) {
         bool node_is_our_loop = false;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+        TPM2_NOTE(suggested);
+
         log_setup();
 
         r = parse_argv(argc, argv);
index 011162865b8f20bb11f5e4fe8d0139c8d73e976e..ea6ee54ba6246a24a9a5f1ab6af62f876e3330f9 100644 (file)
@@ -20,6 +20,7 @@
 #include "bus-locator.h"
 #include "bus-util.h"
 #include "crypto-util.h"
+#include "dlopen-note.h"
 #include "dns-configuration.h"
 #include "dns-domain.h"
 #include "dns-packet.h"
@@ -3792,6 +3793,8 @@ static int run(int argc, char **argv) {
         bool compat = false;
         int r;
 
+        LIBCRYPTO_NOTE(suggested);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index 66171e9b3498399ee973af33baf5288a55a32cf7..ba487c9172922c97f09337fe69642ca48f0cc7f1 100644 (file)
@@ -9,6 +9,7 @@
 #include "bus-object.h"
 #include "capability-util.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "label-util.h"
 #include "log.h"
 #include "main-func.h"
@@ -24,6 +25,8 @@ static int run(int argc, char *argv[]) {
         _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = service_parse_argv("systemd-resolved.service",
index 1eec7726ef8a663b4329d87532de152041253e1b..17f526b7276312687e6cb0179208a77fc20b57c6 100644 (file)
@@ -24,6 +24,7 @@
 #include "detach-loopback.h"
 #include "detach-md.h"
 #include "detach-swap.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "exec-util.h"
 #include "fd-util.h"
@@ -378,6 +379,8 @@ int main(int argc, char *argv[]) {
         size_t n_luo_fds = 0;
         int cmd, r;
 
+        LIBSELINUX_NOTE(recommended);
+
         /* LUO will preserve these across kexec */
         dual_timestamp_now(&shutdown_late_start);
 
index be0179ccc9eebdf532475da52d1be92e5a46a9da..fa60131ba913ba5a2f8fa56688ca60a7130243c4 100644 (file)
@@ -9,6 +9,7 @@
 #include "alloc-util.h"
 #include "build.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "escape.h"
@@ -468,6 +469,8 @@ static int run(int argc, char **argv) {
         _cleanup_strv_free_ char **exec_argv = NULL;
         int r, n;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         char **args = NULL;
index 7d67d4178ec89ed484ff6b1ca2c88ca3eefb0f3e..a5ae1110434fca29b14e164c81a6156435caa469 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "alloc-util.h"
 #include "creds-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -450,6 +451,9 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
 
         assert(dest);
 
+        LIBCRYPTO_NOTE(suggested);
+        TPM2_NOTE(suggested);
+
         r = proc_cmdline_parse(parse_proc_cmdline_item, /* userdata= */ NULL, /* flags= */ 0);
         if (r < 0)
                 log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
index c8c50279f5bdbc4d57a0b18250de19552a4008f7..3c308bd8b6a6105d138835425efdfa817e35cb0c 100644 (file)
@@ -28,6 +28,7 @@
 #include "devnum-util.h"
 #include "discover-image.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "escape.h"
@@ -3175,6 +3176,9 @@ static int run(int argc, char *argv[]) {
         char **args = NULL;
         int r;
 
+        LIBCRYPTO_NOTE(suggested);
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         arg_image_class = invoked_as(argv, "systemd-confext") ? IMAGE_CONFEXT : IMAGE_SYSEXT;
index e1346a5e26ffe404926395f413b2d445cfc08644..82232f8ccb7a1cc3505e36371dd1b2380a8a5def 100644 (file)
@@ -15,6 +15,7 @@
 #include "chase.h"
 #include "conf-files.h"
 #include "constants.h"
+#include "dlopen-note.h"
 #include "efi-loader.h"
 #include "efivars.h"
 #include "env-file.h"
@@ -2068,6 +2069,11 @@ static void end_marker(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+
         setlocale(LC_ALL, "");
 
         r = parse_argv(argc, argv);
index 8e2b1c170d5f556254dc721c48a6b4e1e534e4da..fea186d9cd2c669e4a694389905998e116a7b44c 100644 (file)
@@ -3,6 +3,7 @@
 #include <locale.h>
 
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "glyph-util.h"
 #include "log.h"
 #include "logs-show.h"
@@ -23,6 +24,13 @@ static int run(int argc, char *argv[]) {
         char **args = STRV_EMPTY;
         int r;
 
+        COMPRESS_DEFAULT_NOTE;
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         setlocale(LC_ALL, "");
         log_setup();
 
index 16aff0b6812846a353156bbb540149c3268a2eda..fe39d31f6a90c3495e64cd7932705874ff3e5bf6 100644 (file)
@@ -14,6 +14,7 @@
 #include "constants.h"
 #include "discover-image.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
@@ -2685,6 +2686,11 @@ static int vl_server(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTO_NOTE(suggested);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         char **args = NULL;
index 48d256b15c23bb0bb03d5d510bc990ff6bafc354..c32fb72d5e867fed7358c65b46a77f9e04091a42 100644 (file)
@@ -11,6 +11,7 @@
 #include "copy.h"
 #include "creds-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "extract-word.h"
 #include "fd-util.h"
@@ -2269,6 +2270,14 @@ static int run(int argc, char *argv[]) {
         Item *i;
         int r;
 
+        LIBAUDIT_NOTE(recommended);
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPT_NOTE(recommended);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBCRYPTO_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         char **args = NULL;
         r = parse_argv(argc, argv, &args);
         if (r <= 0)
index 5d20e6ca0616f5c5efe79039e5be9b8b46c125b2..efc255d5e5f4ece23c892789b2bb203f0c675527 100644 (file)
@@ -25,6 +25,7 @@
 #include "conf-files.h"
 #include "constants.h"
 #include "daemon-util.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -1164,6 +1165,8 @@ static int run(int argc, char *argv[]) {
         _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = service_parse_argv("systemd-timedated.service",
index 261a4f0b92a530acf9fde9c51c605449716be031..0667b5b71f86b7501b7f147603eba1b339a3ba57 100644 (file)
@@ -25,6 +25,7 @@
 #include "devnum-util.h"
 #include "dirent-util.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "errno-util.h"
 #include "escape.h"
@@ -4853,6 +4854,12 @@ static int run(int argc, char *argv[]) {
         } phase;
         int r;
 
+        LIBBLKID_NOTE(recommended);
+        LIBCRYPTSETUP_NOTE(suggested);
+        LIBCRYPTO_NOTE(suggested);
+        LIBMOUNT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         char **args = NULL;
         r = parse_argv(argc, argv, &args);
         if (r <= 0)
index 19186ecc02fd8861147bedc8be31a03a998725cd..fcef2b76bb2f9392fec6efd5cf85266ad6f1e805 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "alloc-util.h"
 #include "build.h"
+#include "dlopen-note.h"
 #include "env-util.h"
 #include "fileio.h"
 #include "format-table.h"
@@ -110,6 +111,10 @@ static int request_tpm2_clear(void) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBTSS2_ESYS_NOTE(suggested);
+        LIBTSS2_MU_NOTE(suggested);
+        LIBTSS2_RC_NOTE(suggested);
+
         log_setup();
 
         r = parse_argv(argc, argv);
index 5a4a88bf9f42863f83dcd359f664b5d955c5501e..7a826a0be183d0305690825dc218852f769d315e 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <unistd.h>
 
+#include "dlopen-note.h"
 #include "dropin.h"
 #include "efivars.h"
 #include "generator.h"
@@ -169,6 +170,10 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
 
         assert_se(arg_dest = dest);
 
+        LIBTSS2_ESYS_NOTE(suggested);
+        LIBTSS2_MU_NOTE(suggested);
+        LIBTSS2_RC_NOTE(suggested);
+
         r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
         if (r < 0)
                 log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
index 897c4daf14fd8afe3880a80e21712a5ce27bd599..d655ab46d39989ed44b6df99cbf0beb3a4bcedc5 100644 (file)
@@ -10,6 +10,7 @@
 #include "conf-files.h"
 #include "constants.h"
 #include "crypto-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -599,6 +600,8 @@ static int run(int argc, char *argv[]) {
                 return EXIT_SUCCESS;
         }
 
+        LIBBLKID_NOTE(recommended);
+
         r = DLOPEN_LIBCRYPTO(LOG_ERR, required);
         if (r < 0)
                 return r;
index 33d5defd06083ee80de0a87446d478972fa3e03b..a97c7c31bed469413655a5cc0e4bef5595c7fe7c 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "alloc-util.h"
 #include "chase.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "escape.h"
 #include "fd-util.h"
@@ -145,6 +146,8 @@ static int setup_swtpm(const char *state_dir, int state_fd, const char *secret)
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBBLKID_NOTE(recommended);
+
         log_setup();
 
         _cleanup_free_ char *runtime_dir = NULL;
index c7b1fb3e1fbe89ed3a5ded3d3188574943941892..d57ade56c9e7bf8d4e6a307127abb51eb1767b91 100644 (file)
@@ -19,6 +19,7 @@
 #include "daemon-util.h"
 #include "devnum-util.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "exit-status.h"
 #include "fd-util.h"
@@ -700,6 +701,8 @@ static int ask_on_consoles(char *argv[]) {
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         umask(0022);
index 9b7b09370a97f79c6382f7cdb327b7f95a1b711d..341e00d1186c07cd359fa5e923b462d4a0cfc8ea 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdio.h>
 
 #include "argv-util.h"
+#include "dlopen-note.h"
 #include "format-table.h"
 #include "help-util.h"
 #include "label-util.h"
@@ -101,6 +102,10 @@ static int run(int argc, char *argv[]) {
         char **args = NULL;
         int r;
 
+        LIBAPPARMOR_NOTE(recommended);
+        LIBAUDIT_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         if (invoked_as(argv, "udevd"))
                 return run_udevd(argc, argv);
 
index 67ce353e114d2989a50594df86d08e2095abec37..ceb833749562d57ddde82e2cc58af3863acc99e9 100644 (file)
@@ -5,6 +5,7 @@
 #include "alloc-util.h"
 #include "build.h"
 #include "chase.h"
+#include "dlopen-note.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -124,6 +125,8 @@ static int run(int argc, char *argv[]) {
         struct stat st;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         r = parse_argv(argc, argv);
         if (r <= 0)
                 return r;
index d27616c2cd37e324aa1197396d1c3e769d795c9b..3ae949f11481e94be5b82b05e93805d75b948b24 100644 (file)
@@ -7,6 +7,7 @@
 #include "bus-error.h"
 #include "bus-locator.h"
 #include "bus-util.h"
+#include "dlopen-note.h"
 #include "libaudit-util.h"
 #include "log.h"
 #include "main-func.h"
@@ -109,6 +110,8 @@ static int run(int argc, char *argv[]) {
                 .audit_fd = -EBADF,
         };
 
+        LIBAUDIT_NOTE(recommended);
+
         log_setup();
 
         umask(0022);
index faf37602af771fc590ac751b9aa6076f9f79a785..f9717b88cc98b1b4f8e2bc127340483180651353 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <sys/stat.h>
 
+#include "dlopen-note.h"
 #include "fs-util.h"
 #include "label-util.h"
 #include "log.h"
@@ -12,6 +13,8 @@
 static int run(int argc, char *argv[]) {
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         if (argc != 2)
                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                        "This program requires one argument.");
index fd349b282677b83a155586c447004346c8edf1a0..e4fd5a9e8d695f90f91104022909d1595f14f13b 100644 (file)
@@ -10,6 +10,7 @@
 #include "copy.h"
 #include "creds-util.h"
 #include "dirent-util.h"
+#include "dlopen-note.h"
 #include "errno-list.h"
 #include "errno-util.h"
 #include "escape.h"
@@ -1853,6 +1854,8 @@ static int run(int argc, char *argv[]) {
         _cleanup_strv_free_ char **args = NULL;
         int r;
 
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         r = parse_argv(argc, argv, &args);
index dde1910866b9a051719f27a50ebdeffb59849988..56c199dbd7fe99fae47af3f4611b1bf86478e090 100644 (file)
@@ -8,6 +8,7 @@
 #include "alloc-util.h"
 #include "argv-util.h"
 #include "cryptsetup-util.h"
+#include "dlopen-note.h"
 #include "extract-word.h"
 #include "fileio.h"
 #include "format-table.h"
@@ -493,6 +494,8 @@ static int run(int argc, char *argv[]) {
 
         log_setup();
 
+        LIBCRYPTO_NOTE(suggested);
+
         r = DLOPEN_CRYPTSETUP(LOG_ERR, required);
         if (r < 0)
                 return r;
index 2a3ee83512ee26c1e342ab7dab217bf739682c69..460219c1445fe6c60dc3b90784402db52be1ff34 100644 (file)
@@ -29,6 +29,7 @@
 #include "copy.h"
 #include "discover-image.h"
 #include "dissect-image.h"
+#include "dlopen-note.h"
 #include "escape.h"
 #include "ether-addr-util.h"
 #include "event-util.h"
@@ -4286,6 +4287,9 @@ static int run(int argc, char *argv[]) {
         int r, kvm_device_fd = -EBADF, vhost_device_fd = -EBADF;
         _cleanup_strv_free_ char **names = NULL;
 
+        LIBBLKID_NOTE(recommended);
+        LIBSELINUX_NOTE(recommended);
+
         log_setup();
 
         arg_runtime_scope = getuid() == 0 ? RUNTIME_SCOPE_SYSTEM : RUNTIME_SCOPE_USER;
index 883f193ff448fe25be443c70eecc4f9b6ae9248f..9e337958ab0a251fdb2df2e884894539f6afd4a8 100644 (file)
@@ -7,6 +7,7 @@
 #include "blockdev-util.h"
 #include "chase.h"
 #include "devnum-util.h"
+#include "dlopen-note.h"
 #include "escape.h"
 #include "log.h"
 #include "main-func.h"
@@ -122,6 +123,8 @@ static int run(int argc, char *argv[]) {
         dev_t devt;
         int r;
 
+        LIBMOUNT_NOTE(recommended);
+
         log_setup();
 
         if (argc > 3)