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-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d91e87861f6960e017a0379e5da97c299d2735df;p=elogind.git build-sys: s/HAVE_SMACK/ENABLE_SMACK/ Same justification as for HAVE_UTMP. --- diff --git a/src/basic/build.h b/src/basic/build.h index 0448a76f5..a454c9465 100644 --- a/src/basic/build.h +++ b/src/basic/build.h @@ -51,7 +51,7 @@ #endif #endif // 0 -#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 46ec68975..691c0670e 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/mount-setup.c b/src/core/mount-setup.c index 4a5a22f9b..f9e476a01 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -67,7 +67,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 @@ -83,7 +83,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, @@ -93,7 +93,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 @@ -351,7 +351,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, @@ -384,7 +384,7 @@ int mount_setup(bool loaded_policy) { return r; #if 0 /// elogind does not control /, /dev, /run and /run/systemd/* are setup elsewhere. -#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