Sets 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_setnameattr (namespace, rsname, command, attr)
char *namespace, *rsname;
unsigned int command;
rs_attributes_t * attr;
The rs_setnameattr subroutine sets (depending on the command value) one or more of the owner, group, or access control information of the system registry resource set definition specified by the namespace and rsname parameters.
The owner ID and/or group ID and/or access control information of the rsname parameter must be supplied 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 rsname should be found. |
rsname | Points to a null terminated string corresponding to the name the information should be retrieved for. |
command | Specifies which attributes should be changed.
This parameter is constructed by logically ORing one or more of the
following values, defined in rset.h:
|
attr | Points to an rs_attributes_t structure
containing the owner, group and mode fields, which will
possibly be used by the subroutine for setting attributes. The mode field
is used to store the access permissions, and is constructed by logically
ORing one or more of the following values, defined in rset.h:
|
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_setnameattr subroutine is unsuccessful if one or more of the following are true:
Item | Description |
---|---|
EINVAL | One of the following is true:
|
EPERM | One of the following is true:
|
ENOENT | rsname could not be found in the name space identified by namespace. |
ENOSPC | Out of file-space blocks. |
EFAULT | Invalid address; exceptions outside errno range. |
ENOSYS | The rs_setnameattr subroutine is not supported by the system. |