rs_setnameattr Subroutine
Purpose
Sets the access control information of a resource set definition in the system resource set registry.
Library
Standard C library (libc.a)
Syntax
#include <sys/rset.h>
int rs_setnameattr (namespace, rsname, command, attr)
char *namespace, *rsname;
unsigned int command;
rs_attributes_t * attr;
Description
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.
Note:
- In order to be able to set the attributes of a name, the calling process must have root authority or the attachment privilege and an effective user ID equal to that of the rsname parameter's owner.
- Root authority is required to change the resource set definition owner ID, or to set its group ID outside of the caller's list of groups.
Parameters
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:
|
Return Values
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.
Error Codes
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. |