]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: s/HAVE_SMACK/ENABLE_SMACK/
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 Oct 2017 10:22:40 +0000 (12:22 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 4 Oct 2017 10:09:50 +0000 (12:09 +0200)
Same justification as for HAVE_UTMP.

meson.build
src/basic/build.h
src/basic/smack-util.c
src/core/execute.c
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/mount-setup.c
src/core/smack-setup.c

index 26aa6993ee476155f0939b02d3cf289b118263d0..71e038f9d39e7103245cd3ea365f0faaac787a7c 100644 (file)
@@ -1063,7 +1063,7 @@ foreach pair : [['utmp',          'ENABLE_UTMP'],
                 ['efi',           'ENABLE_EFI'],
                 ['tpm',           'ENABLE_TPM'],
                 ['ima',           'ENABLE_IMA'],
-                ['smack',         'HAVE_SMACK'],
+                ['smack',         'ENABLE_SMACK'],
                 ['gshadow',       'ENABLE_GSHADOW'],
                 ['idn',           'ENABLE_IDN'],
                 ['nss-systemd',   'ENABLE_NSS_SYSTEMD'],
index bb65a2e42efa71c96114fd467da30e08b8918261..9aaa6e3daeb6142ac30752500e30c9a7b988ed68 100644 (file)
@@ -49,7 +49,7 @@
 #define _IMA_FEATURE_ "-IMA"
 #endif
 
-#if HAVE_SMACK
+#if ENABLE_SMACK
 #define _SMACK_FEATURE_ "+SMACK"
 #else
 #define _SMACK_FEATURE_ "-SMACK"
index e80327c2001c137085c87b2df1402d09054aed3e..3dcf150c5994b2c0d731b7e8a06004443741115e 100644 (file)
@@ -35,7 +35,7 @@
 #include "string-table.h"
 #include "xattr-util.h"
 
-#if HAVE_SMACK
+#if ENABLE_SMACK
 bool mac_smack_use(void) {
         static int cached_use = -1;
 
index 2271a2876a2e19a46506731a2cdd85b8a57d485d..a663a365169bcec5f588e0d6384afde1553413e2 100644 (file)
@@ -2691,7 +2691,7 @@ static int exec_child(
 #if HAVE_SELINUX
         bool use_selinux = false;
 #endif
-#if HAVE_SMACK
+#if ENABLE_SMACK
         bool use_smack = false;
 #endif
 #if HAVE_APPARMOR
@@ -3051,7 +3051,7 @@ static int exec_child(
 #if HAVE_SELINUX
                 use_selinux = mac_selinux_use();
 #endif
-#if HAVE_SMACK
+#if ENABLE_SMACK
                 use_smack = mac_smack_use();
 #endif
 #if HAVE_APPARMOR
@@ -3237,7 +3237,7 @@ static int exec_child(
                 }
 #endif
 
-#if HAVE_SMACK
+#if ENABLE_SMACK
                 if (use_smack) {
                         r = setup_smack(context, command);
                         if (r < 0) {
index cc8aad05a08bd8fa33ef713be823ef1f640f512e..f3d0a738bdd0fcb377648a8ba3d11a0ebaa3f024 100644 (file)
@@ -131,7 +131,7 @@ m4_ifdef(`HAVE_SELINUX',
 m4_ifdef(`HAVE_APPARMOR',
 `$1.AppArmorProfile,             config_parse_exec_apparmor_profile, 0,                             offsetof($1, exec_context)',
 `$1.AppArmorProfile,             config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
-m4_ifdef(`HAVE_SMACK',
+m4_ifdef(`ENABLE_SMACK',
 `$1.SmackProcessLabel,           config_parse_exec_smack_process_label, 0,                          offsetof($1, exec_context)',
 `$1.SmackProcessLabel,           config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')'
 )m4_dnl
@@ -356,7 +356,7 @@ Socket.FileDescriptorName,       config_parse_fdname,                0,
 Socket.Service,                  config_parse_socket_service,        0,                             0
 Socket.TriggerLimitIntervalSec,  config_parse_sec,                   0,                             offsetof(Socket, trigger_limit.interval)
 Socket.TriggerLimitBurst,        config_parse_unsigned,              0,                             offsetof(Socket, trigger_limit.burst)
-m4_ifdef(`HAVE_SMACK',
+m4_ifdef(`ENABLE_SMACK',
 `Socket.SmackLabel,              config_parse_unit_string_printf,    0,                             offsetof(Socket, smack)
 Socket.SmackLabelIPIn,           config_parse_unit_string_printf,    0,                             offsetof(Socket, smack_ip_in)
 Socket.SmackLabelIPOut,          config_parse_unit_string_printf,    0,                             offsetof(Socket, smack_ip_out)',
index 04170695c5dfb839d13962e7483266cbae1ec293..51e31c7ca0855cafb923a9e2490be773d2123a5f 100644 (file)
@@ -4504,7 +4504,7 @@ void unit_dump_config_items(FILE *f) {
                 const ConfigParserCallback callback;
                 const char *rvalue;
         } table[] = {
-#if !HAVE_SYSV_COMPAT || !HAVE_SECCOMP || !HAVE_PAM || !HAVE_SELINUX || !HAVE_SMACK || !HAVE_APPARMOR
+#if !HAVE_SYSV_COMPAT || !HAVE_SECCOMP || !HAVE_PAM || !HAVE_SELINUX || !ENABLE_SMACK || !HAVE_APPARMOR
                 { config_parse_warn_compat,           "NOTSUPPORTED" },
 #endif
                 { config_parse_int,                   "INTEGER" },
index 676c82dcc9a159d3059a59147d093dc49ac98354..3d7831d032fc40a2dc409cd74e4349c29ca7b50b 100644 (file)
@@ -64,7 +64,7 @@ typedef struct MountPoint {
  * fourth (securityfs) is needed by IMA to load a custom policy. The
  * other ones we can delay until SELinux and IMA are loaded. When
  * SMACK is enabled we need smackfs, too, so it's a fifth one. */
-#if HAVE_SMACK
+#if ENABLE_SMACK
 #define N_EARLY_MOUNT 5
 #else
 #define N_EARLY_MOUNT 4
@@ -79,7 +79,7 @@ static const MountPoint mount_table[] = {
           NULL,          MNT_FATAL|MNT_IN_CONTAINER },
         { "securityfs",  "/sys/kernel/security",      "securityfs", NULL,                      MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,          MNT_NONE                   },
-#if HAVE_SMACK
+#if ENABLE_SMACK
         { "smackfs",     "/sys/fs/smackfs",           "smackfs",    "smackfsdef=*",            MS_NOSUID|MS_NOEXEC|MS_NODEV,
           mac_smack_use, MNT_FATAL                  },
         { "tmpfs",       "/dev/shm",                  "tmpfs",      "mode=1777,smackfsroot=*", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
@@ -89,7 +89,7 @@ static const MountPoint mount_table[] = {
           NULL,          MNT_FATAL|MNT_IN_CONTAINER },
         { "devpts",      "/dev/pts",                  "devpts",     "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC,
           NULL,          MNT_IN_CONTAINER           },
-#if HAVE_SMACK
+#if ENABLE_SMACK
         { "tmpfs",       "/run",                      "tmpfs",      "mode=755,smackfsroot=*",  MS_NOSUID|MS_NODEV|MS_STRICTATIME,
           mac_smack_use, MNT_FATAL                  },
 #endif
@@ -336,7 +336,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
         return 0;
 }
 
-#if HAVE_SELINUX || HAVE_SMACK
+#if HAVE_SELINUX || ENABLE_SMACK
 static int nftw_cb(
                 const char *fpath,
                 const struct stat *sb,
@@ -367,7 +367,7 @@ int mount_setup(bool loaded_policy) {
         if (r < 0)
                 return r;
 
-#if HAVE_SELINUX || HAVE_SMACK
+#if HAVE_SELINUX || ENABLE_SMACK
         /* Nodes in devtmpfs and /run need to be manually updated for
          * the appropriate labels, after mounting. The other virtual
          * API file systems like /sys and /proc do not need that, they
index be32c434235bc58e4a0a3163d8aa0912a8fefbd9..9cd539f3d37fc368153763d54b8f5cf2d92e050a 100644 (file)
@@ -36,7 +36,7 @@
 #include "string-util.h"
 #include "util.h"
 
-#if HAVE_SMACK
+#if ENABLE_SMACK
 
 static int write_access2_rules(const char* srcdir) {
         _cleanup_close_ int load2_fd = -1, change_fd = -1;
@@ -316,7 +316,7 @@ static int write_onlycap_list(void) {
 
 int mac_smack_setup(bool *loaded_policy) {
 
-#if HAVE_SMACK
+#if ENABLE_SMACK
 
         int r;