mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 19:28:29 +00:00
Don't retrieve uid/gid from auxv
This commit is contained in:
parent
e98514cdb7
commit
bd118dafa0
3 changed files with 4 additions and 22 deletions
|
@ -16,12 +16,10 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/_getauxval.internal.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/strace.internal.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/auxv.h"
|
||||
|
||||
/**
|
||||
* Returns effective user ID of calling process.
|
||||
|
@ -29,10 +27,7 @@
|
|||
*/
|
||||
int geteuid(void) {
|
||||
int rc;
|
||||
struct AuxiliaryValue av;
|
||||
if ((av = _getauxval(AT_EUID)).isfound) {
|
||||
rc = av.value;
|
||||
} else if (!IsWindows()) {
|
||||
if (!IsWindows()) {
|
||||
rc = sys_geteuid();
|
||||
} else {
|
||||
rc = getuid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue