0.9b (c) 1995 Peter Childs
The function modifies one or more access control profiles for an existing access control list for a resource.
Syntax
MyRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
Parameters
The parameters required are:
'ModifyACL' The REXX variable holding the values. The variable is divided into:
o ModifyACL.audit
The auditing flags. The flags are defined as follows:
- A Audit all. When this bit is set, all access attempts will be audited.
- O If O, audit successful file opens.
- W If W, audit successful file writes and successful directory creates.
- D If D, audit successful file deletes or truncates and successful directory deletes.
- P If P, audit successful file and directory access control profile change.
- o If o, audit failed file opens.
- w If w, audit failed file writes and failed directory creates.
- d If d, audit failed file deletes or truncates and failed directory deletes.
- p If d, audit failed file and directory access control profile change.
- N or -none- No auditing is performed.
If no value is specied or ModifyACL.audit is not defined, existing auditing flags are not modified
o ModifyACL.count
The number of access controls available for the resource. The value can be 0 or undefined. In this case access control profiles are not modified
o ModifyACL.i.ugname
The user account or group name. The variable i has a value from 1 to ModifyACL.count
o ModifyACL.i.access
The access control profile. The variable i is specified as above. The access control flags are as follows:
- N None
- A Attribute
- R Read
- W Write
- C Create
- X Execute
- D Delete
- P Permissions
- G This is a Group permission. The G parameter is not required to be specified
SrvName The server computer name
resourceName The resource name must be specified in the name format as described below:
Resource Type Name Format ------------- ----------- Drive drive: Path \path Directory drive:pathname File drive:pathname UNC \\server\sharename\path Pipe \pipe\pipename Spooler Queue \print\queuename Serial Device Queue \comm\chardevqueue
Note
The server computer name can be specified as '' for a local server.
Example
/* Modify existing Access Control Entry */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETACCESS = 10 SrvName = '\\ILIDC' resourceName = 'D:\APPS\TEMP' ModifyACL.count = 1 ModifyACL.1.ugname = 'CSUSERS' ModifyACL.1.access = 'RWCD' myRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName) if myRc <> '0' then do say 'Got error from NetSetInfo() ' myRc call DropLsRxutFuncs exit 9 end else do say say "Access Control Profile modified successfully" end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Access Control Profile modified successfully
Inf-HTML End Run - Successful