]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/smack-setup.c
meson: ignore -Dsmack-run-label= if -Dsmack=false 20800/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 Sep 2021 17:53:20 +0000 (19:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 Sep 2021 18:13:37 +0000 (20:13 +0200)
commit07b382cc2bd274439770b1a47878ab125aa85499
tree791551c2acb661bc91b28d9373f0e3340d4d4670
parentce0458be09911e75bfd3b4d802c9594c55a9c98d
meson: ignore -Dsmack-run-label= if -Dsmack=false

Compilation would fail because we could have HAVE_SMACK_RUN_LABEL without
HAVE_SMACK. This doesn't make much sense, so let's just make -Dsmack=false
completely disable smack.

Also, the logic in smack-setup.c seems dubious: '#ifdef SMACK_RUN_LABEL'
would evaluate to true even if -Dsmack-run-label='' is used. I think
this was introduced in the conversion to meson:
8b197c3a8a57c3f7c231b39e5660856fd9580c80 added

AC_ARG_WITH(smack-run-label,
AS_HELP_STRING([--with-smack-run-label=STRING],
        [run systemd --system with a specific SMACK label]),
        [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
        [])

i.e. it really was undefined if not specified. And it was same
still in 72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8 when configure.ac
was dropped.

So let's use the single conditional HAVE_SMACK_RUN_LABEL everywhere.
meson.build
src/core/smack-setup.c
src/shared/mount-setup.c