[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    getaudit(2) manual page Table of Contents

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:
  1. 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)


    Table of Contents