Add getgroups and setgroups (#619)

This commit is contained in:
Gavin Hayes 2022-09-18 05:48:53 -04:00 committed by GitHub
parent 3665232d66
commit 4c40c500b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 280 additions and 29 deletions

View file

@ -17,21 +17,21 @@
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"
/**
* Returns effective user ID of calling process.
* @return user id
*/
int geteuid(void) {
int rc;
uint32_t geteuid(void) {
uint32_t rc;
if (!IsWindows()) {
rc = sys_geteuid();
} else {
rc = getuid();
}
STRACE("%s() → %d% m", "geteuid", rc);
STRACE("%s() → %u% m", "geteuid", rc);
return rc;
}