IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


NETACCESSADD


The function adds one or more access control profiles to a existing access 
control list for a resource.   
Syntax 


MyRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)

  
Parameters 
The parameters required are: 
'AddtoACL'  The REXX variable holding the values. The variable is divided 
            into: 
   o AddtoACL.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 
     created 
   o AddtoACL.i.ugname 
     The user account or group name. The variable i has a value from 1 to 
     AddtoACL.count 
   o AddtoACL.i.access 
     The access 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   


/* Add another Access Control Entry to existing Access Profile List */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETACCESSADD = 250
SrvName = '\\ILIDC'
resourceName = 'D:\APPS\TEMP'
AddtoACL.count = 1
AddtoACL.1.ugname = 'CSUSERS'
AddtoACL.1.access = 'RWC'

myRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)

if myRc <> '0' then do
 say 'Got error from NetAdd() ' myRc
 call DropLsRxutFuncs
 exit 9
end
else do
 say
 say "Additional Access Control Profile added successfully"
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   


Additional Access Control Profile added successfully



Inf-HTML End Run - Successful