From: Zbigniew Jędrzejewski-Szmek Date: Tue, 3 Oct 2017 10:22:40 +0000 (+0200) Subject: build-sys: s/HAVE_SMACK/ENABLE_SMACK/ X-Git-Tag: v235~27^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9fa32f09cc9e0261f0ab902e7c493f777c93b56;p=platform%2Fupstream%2Fsystemd.git build-sys: s/HAVE_SMACK/ENABLE_SMACK/ Same justification as for HAVE_UTMP. --- diff --git a/meson.build b/meson.build index 26aa699..71e038f 100644 --- a/meson.build +++ b/meson.build @@ -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'], diff --git a/src/basic/build.h b/src/basic/build.h index bb65a2e..9aaa6e3 100644 --- a/src/basic/build.h +++ b/src/basic/build.h @@ -49,7 +49,7 @@ #define _IMA_FEATURE_ "-IMA" #endif -#if HAVE_SMACK +#if ENABLE_SMACK #define _SMACK_FEATURE_ "+SMACK" #else #define _SMACK_FEATURE_ "-SMACK" diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c index e80327c..3dcf150 100644 --- a/src/basic/smack-util.c +++ b/src/basic/smack-util.c @@ -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; diff --git a/src/core/execute.c b/src/core/execute.c index 2271a28..a663a36 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -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) { diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index cc8aad0..f3d0a73 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -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)', diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 0417069..51e31c7 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -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" }, diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 676c82d..3d7831d 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -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 diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c index be32c43..9cd539f 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c @@ -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;