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
This commit is contained in:
that
2014-12-22 04:52:37 +01:00
committed by Dees Troy
parent d79d9bceb3
commit a3d31fbe38
7 changed files with 386 additions and 347 deletions
+4
View File
@@ -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;