The app installation was failing under the non-smack environment.
One additional check for the existence of the smack is now added to
prevent the Installer from applying smack rules to the kernel, when
there is no smack security enabled.
The same kind of check is also added to uninstall-app functionality.
Change-Id: I9ed29e7d60e34639173317ac83c1f5314100d6e4
Signed-off-by: Marcin Lis <m.lis@samsung.com>
return false;
}
- if (!smackRules.apply()) {
+ if (smack_smackfs_path() != NULL && !smackRules.apply()) {
LogError("Failed to apply application rules to kernel");
return false;
}
try {
SmackRules rules;
if (rules.loadFromFile(path)) {
- if (!rules.clear()) {
+ if (smack_smackfs_path() != NULL && !rules.clear()) {
LogWarning("Failed to clear smack kernel rules for pkgId: " << pkgId);
// don't stop uninstallation
}