summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2017-01-15 23:00:49 +0100
committerDees Troy <dees_troy@teamw.in>2017-02-03 05:32:00 +0100
commit0c88b846813585c20e796a3848efd118ac96ee48 (patch)
tree3f6068f49a663851d4ef10ee527c708d37aa3755 /gui/action.cpp
parentGUI: Improve automatic determination of TW_THEME (diff)
downloadandroid_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.tar
android_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.tar.gz
android_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.tar.bz2
android_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.tar.lz
android_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.tar.xz
android_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.tar.zst
android_bootable_recovery-0c88b846813585c20e796a3848efd118ac96ee48.zip
Diffstat (limited to 'gui/action.cpp')
-rw-r--r--gui/action.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index fef476287..9c8af35f4 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include <sys/wait.h>
#include <dirent.h>
-#include <pwd.h>
+#include <private/android_filesystem_config.h>
#include <string>
#include <sstream>
@@ -938,14 +938,8 @@ int GUIAction::screenshot(std::string arg __unused)
time_t tm;
char path[256];
int path_len;
- uid_t uid = -1;
- gid_t gid = -1;
-
- struct passwd *pwd = getpwnam("media_rw");
- if (pwd) {
- uid = pwd->pw_uid;
- gid = pwd->pw_gid;
- }
+ uid_t uid = AID_MEDIA_RW;
+ gid_t gid = AID_MEDIA_RW;
const std::string storage = DataManager::GetCurrentStoragePath();
if (PartitionManager.Is_Mounted_By_Path(storage)) {