>>-aclupdateentry--variable--stem--+-------+-------------------><
'-index-'
Function
aclupdateentry updates
an existing access control list (ACL) entry or creates a new entry
if the entry does not already exist in the ACL contained in variable.
Parameters
- variable
- The name of a REXX variable that contains a token to access an
ACL.
- stem
- The name of a stem variable that contains an ACL entry. STEM.0
contains a count of the number of variables set in the stem. The following
variables may be used to access the stem variables. The number in
parentheses is the actual value of the variable:
Variable |
Description |
---|
ACL_ENTRY_TYPE (1) |
Indicates the type of ACL entry: - ACL_ENTRY_USER (1) (User ACL)
- ACL_ENTRY_GROUP (2) (Group ACL)
|
ACL_ID (2) |
The numeric id, uid or gid of the
entry |
ACL_READ (3) |
Indicates read access (1 = yes, 0
= no) |
ACL_WRITE (4) |
Indicates write access (1 = yes,
0 = no) |
ACL_EXECUTE (5) |
Indicates execute or search access
(1 = yes, 0 = no) |
ACL_DELETE (6) |
Indicates that the ACL entry is deleted
(1 = yes, 0 = no) |
- index
- Specifies the relative ACL entry to access. The first entry is
1.
Usage notes
- An entry is identified by either the entry type and ID contained
in stem or by the relative entry number
if index is specified. If index is
0 or greater than the current number of ACL entries, a new entry is
created.
- aclupdateentry can update a deleted
ACL entry, mark an entry as deleted, mark the entry as not deleted,
or add a new entry that is also marked as deleted by appropriate setting
of stem.acl_delete. Also, duplicate entries
can be added when using index. This may
result in an unexpected ACL and should be avoided.
- The read, write, execute, and deleted attributes are set based
on the corresponding stem variables. A value of 1 indicates the attribute
is to be set to 1. Any other value, including not setting the variable,
results in the attribute being set to 0.
- If the requested entry cannot be located, a new entry is created
and the relative index for that entry is returned in retval.
If an existing entry is updated, retval will contain 0. If retval=
-1 and errno=enoent, then a new entry could not be created
because it would exceed the maximum number of entries (1024).
Example
To update an ACL entry, this example
assumes the user has set the appropriate stem variable before the
call.
"aclupdateentry tokenvar acl."
For
a complete example that uses several of the ACL services to list ACLs,
see List the ACL entries for a file.
For more information
about access control lists, see Using
access control lists (ACLs) in z/OS UNIX System Services Planning.