ail_initdb set SMACK label on app_info.db.
As manifest is reset to default floor, we need to remove the smack instruction in the code too.
Change-Id: I3e6f27712dccc0aed055259819eae105f6a17bf5
Signed-off-by: Baptiste DURAND <baptiste.durand@eurogiciel.fr>
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(ail C)
-
+OPTION(SMACK "Enable smack support" ON)
+IF(SMACK)
+ ADD_DEFINITIONS("-DWRT_SMACK_ENABLED") # enable smack
+ENDIF(SMACK)
SET(LIBNAME "lib${PROJECT_NAME}")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")
if (ret == AIL_ERROR_FAIL) {
_E("cannot chown.");
}
-
+#ifdef WRT_SMACK_ENABLED
const char *argv_smack[] = { "/usr/bin/chsmack", "-a", APP_INFO_DB_LABEL, APP_INFO_DB_FILE, NULL };
xsystem(argv_smack);
const char *argv_smackjn[] = { "/usr/bin/chsmack", "-a", APP_INFO_DB_LABEL, APP_INFO_DB_FILE_JOURNAL, NULL };
xsystem(argv_smackjn);
-
+#endif
return AIL_ERROR_OK;
}
%build
CFLAGS+=" -fpic"
-%cmake . -DBUILD_PKGTYPE=rpm
+%cmake . -DBUILD_PKGTYPE=rpm \
+ -DSMACK=Off
make %{?_smp_mflags}