From f1feccec5ad848b4f763376480a006a9d58fa721 Mon Sep 17 00:00:00 2001 From: Ritesh Harjani Date: Wed, 6 Jun 2018 15:09:00 +0530 Subject: mkfs.ubifs: Implement selinux labelling support in mkfs.ubifs. This implements/adds selinux labelling support to mkfs.ubifs utility. It adds an extra option in configure to enable selinux labelling support and then finally in mkfs.ubifs adds an extra option to pass the file_contexts which is looked up for filesystem file labels. - Default behavior is kept without selinux so as to not break existing support where selinux library/headers may not be present. - If this is configured with --with-selinux then XATTR from the file_contexts(passed with --selinux option while mkfs.ubifs) will be taken and not from the host file's xattr. This is done to avoid the problem where the host OS may have selinux enabled and hence same xattr names will be present in both host filesystem files and from the --selinux=file passed. So the existing behavior is kept mutually exclusive and preference is given to selinux xattrs (if configured with --with-selinux). Signed-off-by: Ritesh Harjani Signed-off-by: David Oberhollenzer --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 5a6e77c..391edef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,10 @@ if WITHOUT_LZO AM_CPPFLAGS += -DWITHOUT_LZO endif +if WITH_SELINUX +AM_CPPFLAGS += -DWITH_SELINUX +endif + sbin_PROGRAMS = sbin_SCRIPTS = check_PROGRAMS = -- cgit v1.2.3