diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2016-01-28 21:03:33 +0100 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2016-01-29 21:58:33 +0100 |
commit | b5fab76bea98dff8d0825d16c3dd359397449e9a (patch) | |
tree | a92cf2c085a22c8f246543f558619edd5fd3367e /fixPermissions.hpp | |
parent | adds TW_ADDITIONAL_RES to TW_RES (diff) | |
download | android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.tar android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.tar.gz android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.tar.bz2 android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.tar.lz android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.tar.xz android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.tar.zst android_bootable_recovery-b5fab76bea98dff8d0825d16c3dd359397449e9a.zip |
Diffstat (limited to '')
-rw-r--r-- | fixPermissions.hpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/fixPermissions.hpp b/fixPermissions.hpp deleted file mode 100644 index f61a9a172..000000000 --- a/fixPermissions.hpp +++ /dev/null @@ -1,52 +0,0 @@ -#include <iostream> -#include <fstream> -#include <sstream> -#include <string> -#include <vector> -#include <string.h> -#include <libgen.h> -#include <unistd.h> -#include <sys/stat.h> -#include <dirent.h> -#include <errno.h> -#include "gui/rapidxml.hpp" -#include "twrp-functions.hpp" - -using namespace std; - -class fixPermissions { - public: - fixPermissions(); - ~fixPermissions(); - int fixPerms(bool enable_debug, bool remove_data_for_missing_apps); - int fixContexts(); - int fixDataInternalContexts(void); - - private: - int pchown(string fn, int puid, int pgid); - int pchmod(string fn, mode_t mode); - vector <string> listAllDirectories(string path); - vector <string> listAllFiles(string path); - void deletePackages(); - int getPackages(const string& packageFile); - int fixApps(); - int fixAllFiles(string directory, int uid, int gid, mode_t file_perms); - int fixDir(const string& dir, int diruid, int dirgid, mode_t dirmode, int fileuid, int filegid, mode_t filemode); - int fixDataData(string dataDir); - int restorecon(string entry, struct stat *sb); - int fixDataDataContexts(void); - int fixContextsRecursively(string path, int level); - - struct package { - string pkgName; - string codePath; - string appDir; - string dDir; - int gid; - int uid; - package *next; - }; - bool debug; - bool remove_data; - package* head; -}; |