[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 2

setaudithostdb or endaudithostdb Subroutine

Purpose

Opens and closes the host identifier auditing file.

Library

Security Library (libc.a)

Syntax

#include <usersec.h>
int setaudithostdb (int Mode);
int endaudithostdb (void;

Description

These functions can be used to open and close access to the host auditing information database. Programs that call either the getaudithostattr or putaudithostattr subroutine, call setaudithostdb to open the host database and the endaudithostdb subroutine to close the host database.

The setaudithostdb subroutine opens the host database in the specified mode, if it is not already open. The open count is increased by 1.

The enduserdb subroutine decreases the open count by 1 and closes the host database when this count goes to 0. Any uncommitted changed data is lost.

Parameter

Mode Specifies the mode of the open. This parameter may contain one or more of the following values defined in the usersec.h files:
S_READ Specifies read access.
S_WRITE Specifies write access.

Return Values

On successful completion, the setaudithostdb or endaudithostdb subroutine returns 0. If unsuccessful, the subroutine returns non-zero.

Error Codes

The setaudithostdp or endaudithostdb subroutine fails if the following is true:

EINVAL If Mode is not one of the valid values.

Related Information

The auditmerge command, auditpr command, auditselect command, auditstream command.

The auditread subroutine, getaudithostattr, IDtohost, hosttoID, nexthost or putaudithostattr subroutine.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]