Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S

setauduser(3)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

setauduser — start auditing the current process as owned by a given user

SYNOPSIS

#include <sys/audit.h>

int setauduser(const char *user, const char *stime);

DESCRIPTION

setauduser() sets audit tag which uniquely identifies the user for the current process. The user argument points to the name of the login user associated with the current process, and must not exceed the longest user name that HP-UX supports. sysconf(_SC_LOGIN_NAME_MAX) can be used to dynamically get the longest user name that HP-UX supports.

The stime argument points to time of authentication in the format YYYYMMDDhhmm, Coordinated Universal Time (UTC). If stime is a null pointer, the UTC of the current time is used.

Programs using this routine must be compiled with -lsec.

Security Restrictions

This call requires the user to be superuser or to possess the SELFAUDIT privilege. See privileges(5) for details.

RETURN VALUE

setauduser() returns the following values:

n

Successful completion. n is the length of audit tag accepted by the kernel.

-1

Failure. errno is set to indicate the error.

ERRORS

If setauduser fails, errno is set to one of the following values:

EINVAL

user is NULL, or the length of user exceeds the longest user name that HP-UX supports.

EINVAL

The length of stime is not equal to MAX_TIME_LEN bytes. See <sys/audit.h>.

EPERM

The caller is not a superuser or a privileged process.

AUTHOR

setauduser() was developed by HP.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.