diff options
author | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2014-11-17 20:46:00 +0100 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2014-11-17 20:46:00 +0100 |
commit | 758aeb7dadfcd29b11e8648d784ea56f31be05f3 (patch) | |
tree | c1102c2cc452f8d841dccad1389c4c3840b340af /libprocessgroup/processgroup.cpp | |
parent | 3ef0460e86f2a7c5442bcf424b8e83fdfb8e3669 (diff) | |
download | system_core-758aeb7dadfcd29b11e8648d784ea56f31be05f3.zip system_core-758aeb7dadfcd29b11e8648d784ea56f31be05f3.tar.gz system_core-758aeb7dadfcd29b11e8648d784ea56f31be05f3.tar.bz2 |
Make mkdirAndChown do what it claims to do
Currently, mkdirAndChown takes parameters for mode, uid and gid, but
ignores them and hardcodes 0750, AID_SYSTEM, AID_SYSTEM instead.
This doesn't matter much because so far its only invocation passes
exactly those values as parameters -- but clang complains about unused
parameters.
Might as well make the function do what it claims to do.
Change-Id: I5a8056be3278a0c5d0a576dbc061288aa0956a35
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'libprocessgroup/processgroup.cpp')
-rw-r--r-- | libprocessgroup/processgroup.cpp | 4 |
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); |