From 59d0eb5eccf2a94779b61ff40d25fafe3fab00f0 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Sun, 7 May 2017 12:37:20 +0200 Subject: [PATCH] cg: fix a bug in GetUidGid() to call cgroup_get_uid_gid() correctly GetUidGid() should call cgroup_get_uid_gid() obviously, so that the caller can get correct UIDs/GIDs. --- cg.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cg.go b/cg.go index 7c24bbb..a2ec441 100644 --- a/cg.go +++ b/cg.go @@ -212,11 +212,11 @@ func (cg Cgroup) GetUIDGID() (tasksUID UID, tasksGID GID, controlUID UID, contro cCU C.uid_t cCG C.gid_t ) - err = _err(C.cgroup_set_uid_gid(cg.g, - cTU, - cTG, - cCU, - cCG)) + err = _err(C.cgroup_get_uid_gid(cg.g, + &cTU, + &cTG, + &cCU, + &cCG)) return UID(cTU), GID(cTG), UID(cCU), GID(cCG), err }