IBM OS/2 LAN Server REXX Utility DLL


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


NETACCESS Add


The function creates the auditing entry for a resource and adds 0 or more 
entries in the access control list for a resource.   
Syntax 

MyRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)

  
Parameters 
The parameters required are: 
'Access'  The REXX variable holding the values. The variable is divided 
          into: 
   o Access.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 Access.audit 
     The auditing flags. If the variable is undefined a default value of 
     No auditing is used. The flags are defined as: 
      - 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 
   o Access.i.ugname 
     The user account or group name. i is a value from 1 to Access.count 
     Use the group name USERS to create an access control profile for all 
     users 
   o Access.i.access 
     The access profile. i is specified as above. The access control flags 
     are as follows: 
      - N None 
      - R Read 
      - A Attribute 
      - 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   

/* Create a access control profile for a resource */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETACCESS = 10
SrvName = '\\ILIDC'
resourceName = 'D:\APPS\TEMP'
Access.audit = 'A'
Access.count = 2
Access.1.ugname = 'CSUSERS'
Access.1.access = 'RX'
Access.2.ugname = 'FMAM'
Access.2.access = 'RWCXDP'

myRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)

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

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

Access Control Profile created successfully



Inf-HTML End Run - Successful