summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-01-11 17:45:04 +0100
committerEthan Yonker <dees_troy@teamw.in>2017-01-11 17:45:04 +0100
commit4767caf1f4cd08cdc7d58476bc017dca17870112 (patch)
tree3006d6065f202e43e4d86873f4a8d065e9e17673 /gui/action.cpp
parentChange version to 3.0.3 to support the app release (diff)
downloadandroid_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.tar
android_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.tar.gz
android_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.tar.bz2
android_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.tar.lz
android_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.tar.xz
android_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.tar.zst
android_bootable_recovery-4767caf1f4cd08cdc7d58476bc017dca17870112.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index fe573697e..5ba749c81 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1918,7 +1918,7 @@ int GUIAction::checkforapp(std::string arg __unused)
string parent_path = "/data/app";
DIR *d = opendir("/data/app");
struct dirent *p;
- int len = strlen("me.twrp.twrpapp-");
+ size_t len = strlen("me.twrp.twrpapp-");
while ((p = readdir(d))) {
if (!strcmp(p->d_name, ".") || !strcmp(p->d_name, ".."))
continue;
@@ -1959,7 +1959,7 @@ int GUIAction::installapp(std::string arg __unused)
LOGERR("chown %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
- if (setfilecon(install_path.c_str(), context.c_str()) < 0) {
+ if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) {
LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
@@ -1973,7 +1973,7 @@ int GUIAction::installapp(std::string arg __unused)
LOGERR("chown %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
- if (setfilecon(install_path.c_str(), context.c_str()) < 0) {
+ if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) {
LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
@@ -1986,7 +1986,7 @@ int GUIAction::installapp(std::string arg __unused)
LOGERR("chown %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
- if (setfilecon(install_path.c_str(), context.c_str()) < 0) {
+ if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) {
LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
@@ -2006,7 +2006,7 @@ int GUIAction::installapp(std::string arg __unused)
install_path += "/twrpapp";
LOGINFO("Installing app to '%s'\n", install_path.c_str());
if (mkdir(install_path.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0) {
- if (setfilecon(install_path.c_str(), context.c_str()) < 0) {
+ if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) {
LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}
@@ -2015,7 +2015,7 @@ int GUIAction::installapp(std::string arg __unused)
LOGERR("Error copying apk file\n");
goto exit;
}
- if (setfilecon(install_path.c_str(), context.c_str()) < 0) {
+ if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) {
LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno));
goto exit;
}