man Pages(2): System Calls
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

NAME

getaudit, setaudit - get and set process audit information

SYNOPSIS

cc [ flag . . . ] file . . . -lbsm -lsocket -lnsl -lintl [ library . . . ]
#include <sys/param.h>
#include <bsm/audit.h>
int getaudit( struct auditinfo * info);
int setaudit( struct auditinfo * info);

AVAILABILITY

The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information.

DESCRIPTION

getaudit( ) gets the audit ID, the preselection mask, the terminal ID and the audit session ID of the current process.
setaudit( ) sets the audit ID, the preselection mask, the terminal ID and the audit session ID for the current process.
The info structure used to pass the process audit information contains the following members:
au_id_t             ai_auid;              /* audit user ID * /
au_mask_t           ai_mask;              /* preselection mask * /
au_tid_t            ai_termid;            /* terminal ID * /
au_asid_t           ai_asid;              /* audit session ID * /

Only processes with the effective user ID of the super-user may successfully execute these calls.

RETURN VALUES

getaudit( ) and setaudit( ) return:
0
on success.
-1
on failure and set errno to indicate the error.

ERRORS

EFAULT
The info parameter points outside the process's allocated address space.
EPERM
The process's effective user ID is not super-user.

SEE ALSO

audit(2)