[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


setacldb or endacldb Subroutine

Purpose

Opens and closes the SMIT ACL database.

Library

Security Library (libc.a)

Syntax

#include <usersec.h>

int setacldb(Mode)
int Mode;

int endacldb;

Description

These functions may be used to open and close access to the user SMIT ACL database. Programs that call the getusraclattr or getgrpaclattr subroutines should call the setacldb subroutine to open the database and the endacldb subroutine to close the database.

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

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

Parameters


Mode Specifies the mode of the open. This parameter may contain one or more of the following values defined in the usersec.h file:

S_READ
Specifies read access.

S_WRITE
Specifies update access.

Return Values

The setacldb and endacldb subroutines return a value of 0 to indicate success. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.

Error Codes

The setacldb subroutine fails if the following is true:

EACCES Access permission is denied for the data request.

Both subroutines return errors from other subroutines.

Security

Security Files Accessed: The calling process must have access to the SMIT ACL data.

Mode File rw/etc/security/smitacl.user

Related Information

The getgrpaclattr, nextgrpacl, or putgrpaclattr subroutine, getusraclattr, nextusracl, or putusraclattr subroutine.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]