mirror of
https://github.com/vbatts/go-cgroup.git
synced 2025-02-05 20:03:36 +00:00
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:
parent
8d4b8d0ebb
commit
59d0eb5ecc
1 changed files with 5 additions and 5 deletions
10
cg.go
10
cg.go
|
@ -212,11 +212,11 @@ func (cg Cgroup) GetUIDGID() (tasksUID UID, tasksGID GID, controlUID UID, contro
|
||||||
cCU C.uid_t
|
cCU C.uid_t
|
||||||
cCG C.gid_t
|
cCG C.gid_t
|
||||||
)
|
)
|
||||||
err = _err(C.cgroup_set_uid_gid(cg.g,
|
err = _err(C.cgroup_get_uid_gid(cg.g,
|
||||||
cTU,
|
&cTU,
|
||||||
cTG,
|
&cTG,
|
||||||
cCU,
|
&cCU,
|
||||||
cCG))
|
&cCG))
|
||||||
return UID(cTU), GID(cTG), UID(cCU), GID(cCG), err
|
return UID(cTU), GID(cTG), UID(cCU), GID(cCG), err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue