From 758aeb7dadfcd29b11e8648d784ea56f31be05f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Mon, 17 Nov 2014 20:46:00 +0100 Subject: Make mkdirAndChown do what it claims to do MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- libprocessgroup/processgroup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libprocessgroup/processgroup.cpp') 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); -- cgit v1.1