---
name: "audit_getloginuid"
section: "3"
platform: "linux"
package: "audit"
version: "4.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/audit_getloginuid"
---

# audit\_getloginuid(3)

Get a program's loginuid value

## NAME

audit\_getloginuid - Get a program's loginuid value

## SYNOPSIS

```
#include <libaudit.h>
```

**uid\_t audit\_getloginuid(void);**

## DESCRIPTION

This function returns the task attribute loginuid.

## RETURN VALUE

This function returns the loginuid value if it was set. It will return a -1 if loginuid was unset. However, since uid\_t is an unsigned type, you will see the converted value instead of -1.

## ERRORS

This function returns -1 on failure. However, in the event of a real error, errno would be set. The function can set errno based on failures of open, read, or strtoul.

## SEE ALSO

[**audit\_setloginuid**(3)](/audit_setloginuid/3.md).

## AUTHOR

Steve Grubb
