audit_setloginuid(3)

audit_setloginuid3

Set a program's loginuid value

Usage

#include <libaudit.h>

int audit_setloginuid(uid_tuid);"

Overview

This function sets the task attribute loginuid with the value of uid. The loginuid value may only be set by programs with the CAP_AUDIT_CONTROL capability. This normally means the root account.

The loginuid value is part of the task structure and is inherited by child processes. It is used to track what account a user gained system access with. All system entry point programs should set this value right before changing to the uid of the user granted access so that audit events are properly attributed to the that user.

Return value

This function returns 0 on success and non-zero otherwise.

Releases

10 releases since Debian 5.0 (Lenny); the text changed 2 times.

  1. 5.0–11
  2. 12–13
  3. Arch

Author

Steve Grubb

From audit 4.2.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.