From a3d31fbe385094400719e9a7a79965ff5da9f4b4 Mon Sep 17 00:00:00 2001 From: that Date: Sun, 21 Dec 2014 22:27:40 +0100 Subject: fixPermissions: simplify code, fix bugs - avoid parsing permission strings - fix memory leaks, a fix new/free mismatch and a compiler warning - fix that only first updated-package was processed - fix a potential stack overflow if packages.xml is huge - minor refactoring for reducing duplicated code - don't process packages without codePath - fix path for deleting app data (currently unused anyway) - fix file ownership on libs - try not to mess up Android 5.0 app permissions Patch set 4 - make fixing SELinux contexts an option with a check box - add some notes / text to the themes Patch set 6 - decouple "fix permissions" from "fix contexts" Change-Id: Icc77ecc581befc5ce6e419b1f3b8ca189208c234 --- partitionmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index ebd8c9675..72eb43dbf 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1433,6 +1433,10 @@ int TWPartitionManager::Fix_Permissions(void) { fixPermissions perms; result = perms.fixPerms(true, false); +#ifdef HAVE_SELINUX + if (result == 0 && DataManager::GetIntValue("tw_fixperms_restorecon") == 1) + result = perms.fixContexts(); +#endif UnMount_Main_Partitions(); gui_print("Done.\n\n"); return result; -- cgit v1.2.3