Don't retrieve uid/gid from auxv

This commit is contained in:
Justine Tunney 2022-07-24 23:54:07 -07:00
parent e98514cdb7
commit bd118dafa0
3 changed files with 4 additions and 22 deletions

View file

@ -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();