Retrieves the access control information of a resource set definition in the system resource set registry.
Standard C library (libc.a)
#include <sys/rset.h>
int rs_getnameattr(namespace, rsname, attr)
char *namespace, *rsname;
rs_attributes_t *attr;
The rs_getnameattr subroutine retrieves from the system resource set registry the access control information of the resource set definition specified by the namespace and rsname parameters.
The owner ID, group ID, and access control information of the specified resource set are stored in the structure pointed to by the attr parameter.
Item | Description |
---|---|
namespace | Points to a null terminated string corresponding to the name space within which the rsname parameter should be found. |
rsname | Points to a null terminated string corresponding to the name the information should be retrieved for. |
attr | Points to an rs_attributes_t structure
containing the owner, group, and mode fields,
which will be filled by the subroutine. The mode field in the rs_attributes_t structure
is used to store the access permissions, and is constructed by logically
ORing one or more of the following values, defined in rset.h:
Read privilege for a user means that the user can retrieve a resource set definition by issuing a call to the rs_getnamedrset subroutine. Write privilege for a user means that the user can redefine a name by issuing another call to the rs_getnamedrset subroutine. |
If successful, a value of 0 is returned. If unsuccessful, a value of -1 is returned and the errno global variable is set to indicate the error.
The rs_getnameattr subroutine is unsuccessful if one or more of the following are true:
Item | Description |
---|---|
EINVAL | If one of the following is true:
|
ENOENT | The rsname parameter could not be found in the name space identified by the namespace parameter. |
EFAULT | Invalid address. |