mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28: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,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue