Accesses the user screen information in the SMIT ACL database.
Security Library (libc.a)
#include <usersec.h>
int getusraclattr(User, Attribute, Value, Type)
char *User;
char *Attribute;
void *Value;
int Type;
char *nextusracl(void)
int putusraclattr(User, Attribute, Value, Type)
char *User;
char *Attribute;
void *Value;
int Type;
The getusraclattr subroutine reads a specified user attribute from the SMIT ACL database. If the database is not already open, this subroutine does an implicit open for reading.
Similarly, the putusraclattr subroutine writes a specified attribute into the user SMIT ACL database. If the database is not already open, this subroutine does an implicit open for reading and writing. Data changed by the putusraclattr subroutine must be explicitly committed by calling the putusraclattr subroutine with a Type parameter specifying SEC_COMMIT. Until all the data is committed, only the getusraclattr subroutine within the process returns written data.
The nextusracl subroutine returns the next user in a linear search of the user SMIT ACL database. The consistency of consecutive searches depends upon the underlying storage-access mechanism and is not guaranteed by this subroutine.
The setacldb and endacldb subroutines should be used to open and close the database.
Item | Description |
---|---|
Attribute | Specifies which attribute is read. The following possible
attributes are defined in the usersec.h file:
|
Type | Specifies the type of attribute expected. Valid types are
defined in the usersec.h file and include:
|
Value | Specifies a buffer, a pointer to a buffer, or a pointer to a pointer depending on the Attribute and Type parameters. See the Type parameter for more details. |
If successful, the getusraclattr returns 0. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
Possible return codes are:
Item | Description |
---|---|
EACCES | Access permission is denied for the data request. |
ENOENT | The specified User parameter does not exist or the attribute is not defined for this user. |
ENOATTR | The specified user attribute does not exist for this user. |
EINVAL | The Attribute parameter does not contain one of the defined attributes or null. |
EINVAL | The Value parameter does not point to a valid buffer or to valid data for this type of attribute. |
EPERM | Operation is not permitted. |