Accesses the group screen information in the SMIT ACL database.
Security Library (libc.a)
int getgrpaclattr (Group, Attribute, Value, Type) char *User; char *Attribute; void *Value; int Type;
int putgrpaclattr (Group, Attribute, Value, Type) char *User; char *Attribute; void *Value; int Type;
The getgrpaclattr subroutine reads a specified group attribute from the SMIT ACL database. If the database is not already open, this subroutine does an implicit open for reading.
Similarly, the putgrpaclattr 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 putgrpaclattr subroutine must be explicitly committed by calling the putgrpaclattr subroutine with a Type parameter specifying SEC_COMMIT. Until all the data is committed, only the getgrpaclattr subroutine within the process returns written data.
The nextgrpacl subroutine returns the next group in a linear search of the group 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.
|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 getgrpaclattr returns 0. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
Possible return codes are:
|EACCES||Access permission is denied for the data request.|
|ENOENT||The specified Group parameter does not exist or the attribute is not defined for this group.|
|ENOATTR||The specified user attribute does not exist for this group.|
|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.|
The getgrpaclattr, nextgrpacl, or putgrpaclattr subroutine, setacldb, or endacldb subroutine.