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.
This commit is contained in:
Dongsu Park 2017-05-07 12:37:20 +02:00
parent 8d4b8d0ebb
commit 59d0eb5ecc
1 changed files with 5 additions and 5 deletions

10
cg.go
View File

@ -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
}