SELinux Security Module development
 help / color / mirror / Atom feed
From: "Björn Bidar" <bjorn.bidar@jolla.com>
To: SElinux list <selinux@vger.kernel.org>
Subject: Re: [PATCH] libselinux: LABEL_BACKEND_ANDROID add option to enable, rebased
Date: Sat, 31 Oct 2020 00:42:29 +0000	[thread overview]
Message-ID: <2475881.4AeNWvRDVU@odin> (raw)
In-Reply-To: <8651564.oA283WntVp@odin>

Add option to just enable the android label backend without disabling
anything else eg. using ANDROID_HOST. Enable by default when using 
ANDROID_HOST.

Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
---
 libselinux/Makefile     | 3 ++-
 libselinux/src/Makefile | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libselinux/Makefile b/libselinux/Makefile
index cb5872b7..ac16c15e 100644
--- a/libselinux/Makefile
+++ b/libselinux/Makefile
@@ -4,6 +4,7 @@ PKG_CONFIG ?= pkg-config
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
 ANDROID_HOST ?= n
+LABEL_BACKEND_ANDROID ?= n
 ifeq ($(ANDROID_HOST),y)
 	override DISABLE_SETRANS=y
 	override DISABLE_BOOL=y
@@ -20,7 +21,7 @@ endif
 ifeq ($(DISABLE_X11),y)
 	DISABLE_FLAGS+= -DNO_X_BACKEND
 endif
-export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST DISABLE_X11
+export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST DISABLE_X11 
LABEL_BACKEND_ANDROID
 
 USE_PCRE2 ?= n
 ifeq ($(USE_PCRE2),y)
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index be0b6eec..52c40f01 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -122,8 +122,12 @@ SRCS= callbacks.c freecon.c label.c label_file.c \
 	label_backends_android.c regex.c label_support.c \
 	matchpathcon.c setrans_client.c sha1.c booleans.c
 else
-DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
+LABEL_BACKEND_ANDROID=y
+endif
+
+ifneq ($(LABEL_BACKEND_ANDROIDT),y)
 SRCS:= $(filter-out label_backends_android.c, $(SRCS))
+DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
 endif
 
 ifeq ($(DISABLE_X11),y)
-- 
2.29.1


  reply	other threads:[~2020-10-31  0:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 12:21 [PATCH] libselinux: LABEL_BACKEND_ANDROID add option to enable it Björn Bidar
2020-10-31  0:42 ` Björn Bidar [this message]
2020-10-31 13:57   ` [PATCH] libselinux: LABEL_BACKEND_ANDROID add option to enable, rebased William Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2475881.4AeNWvRDVU@odin \
    --to=bjorn.bidar@jolla.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox