summaryrefslogtreecommitdiffstats
path: root/libprocessgroup
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2014-11-21 00:58:13 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-21 00:58:14 +0000
commit07148ea2be8110e2310860c5e6a391e542a656be (patch)
treef57143a186beeadbec2ea981542fc2dfc7796632 /libprocessgroup
parent5d8a5ade620be65e0e658dbb99e66398f3ffdc74 (diff)
parent758aeb7dadfcd29b11e8648d784ea56f31be05f3 (diff)
downloadsystem_core-07148ea2be8110e2310860c5e6a391e542a656be.zip
system_core-07148ea2be8110e2310860c5e6a391e542a656be.tar.gz
system_core-07148ea2be8110e2310860c5e6a391e542a656be.tar.bz2
Merge "Make mkdirAndChown do what it claims to do"
Diffstat (limited to 'libprocessgroup')
-rw-r--r--libprocessgroup/processgroup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 49f5903..71c065e 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -279,12 +279,12 @@ static int mkdirAndChown(const char *path, mode_t mode, uid_t uid, gid_t gid)
{
int ret;
- ret = mkdir(path, 0750);
+ ret = mkdir(path, mode);
if (ret < 0 && errno != EEXIST) {
return -errno;
}
- ret = chown(path, AID_SYSTEM, AID_SYSTEM);
+ ret = chown(path, uid, gid);
if (ret < 0) {
ret = -errno;
rmdir(path);