summaryrefslogtreecommitdiffstats
path: root/fixPermissions.hpp
diff options
context:
space:
mode:
authorthat <github@that.at>2014-12-21 22:27:40 +0100
committerDees Troy <dees_troy@teamw.in>2014-12-22 04:52:37 +0100
commita3d31fbe385094400719e9a7a79965ff5da9f4b4 (patch)
tree2f4bb3239063c127dc37089b0cc85f10bb43fa31 /fixPermissions.hpp
parentAllow non datamedia devices to wipe encryption (diff)
downloadandroid_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.tar
android_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.tar.gz
android_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.tar.bz2
android_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.tar.lz
android_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.tar.xz
android_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.tar.zst
android_bootable_recovery-a3d31fbe385094400719e9a7a79965ff5da9f4b4.zip
Diffstat (limited to 'fixPermissions.hpp')
-rw-r--r--fixPermissions.hpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/fixPermissions.hpp b/fixPermissions.hpp
index e57d7bff3..f61a9a172 100644
--- a/fixPermissions.hpp
+++ b/fixPermissions.hpp
@@ -16,28 +16,31 @@ 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(std::string fn, int puid, int pgid);
- int pchmod(std::string fn, string mode);
- vector <string> listAllDirectories(std::string path);
- vector <string> listAllFiles(std::string path);
- int getPackages();
- int fixSystemApps();
- int fixDataApps();
- int fixAllFiles(string directory, int gid, int uid, string file_perms);
+ 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(std::string entry, struct stat *sb);
+ int restorecon(string entry, struct stat *sb);
int fixDataDataContexts(void);
- int fixContextsRecursively(std::string path, int level);
+ int fixContextsRecursively(string path, int level);
struct package {
string pkgName;
string codePath;
string appDir;
- string app;
string dDir;
int gid;
int uid;
@@ -45,8 +48,5 @@ class fixPermissions {
};
bool debug;
bool remove_data;
- bool multi_user;
package* head;
- package* temp;
- string packageFile;
};