mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
uucore: entries: add documentation
This commit is contained in:
parent
60124b8fbd
commit
9af9343745
1 changed files with 7 additions and 0 deletions
|
@ -179,6 +179,13 @@ impl Passwd {
|
||||||
self.inner
|
self.inner
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This is a wrapper function for `libc::getgrouplist`.
|
||||||
|
///
|
||||||
|
/// From: https://man7.org/linux/man-pages/man3/getgrouplist.3.html
|
||||||
|
/// If the user is a member of more than *ngroups groups, then
|
||||||
|
/// getgrouplist() returns -1. In this case, the value returned in
|
||||||
|
/// *ngroups can be used to resize the buffer passed to a further
|
||||||
|
/// call getgrouplist().
|
||||||
pub fn belongs_to(&self) -> Vec<gid_t> {
|
pub fn belongs_to(&self) -> Vec<gid_t> {
|
||||||
let mut ngroups: c_int = 8;
|
let mut ngroups: c_int = 8;
|
||||||
let mut groups = Vec::with_capacity(ngroups as usize);
|
let mut groups = Vec::with_capacity(ngroups as usize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue