mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 16:58:30 +00:00
Add getgroups and setgroups (#619)
This commit is contained in:
parent
3665232d66
commit
4c40c500b8
17 changed files with 280 additions and 29 deletions
|
@ -17,22 +17,22 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
/**
|
||||
* Returns effective group ID of calling process.
|
||||
* @return group id
|
||||
*/
|
||||
int getegid(void) {
|
||||
int rc;
|
||||
uint32_t getegid(void) {
|
||||
uint32_t rc;
|
||||
if (!IsWindows()) {
|
||||
rc = sys_getegid();
|
||||
} else {
|
||||
rc = getgid();
|
||||
}
|
||||
STRACE("%s() → %d% m", "getegid", rc);
|
||||
STRACE("%s() → %u% m", "getegid", rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue