我想知道是否有用于 unix 命令组的替代 C 库,
$ groups ---- lists all the group id's of the user.
有一个名为 getgroups() 的方法,但它返回此方法的用户组。有没有办法使用 C 获取特定用户的组?
#include "<grp.h>"
int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)