IBM OS/2 LAN Server REXX Utility DLL


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


NETACCESS GetInfo


NETACCESS GetInfo function retrieves information about the access control 
profile for a resource. The resource can either be a directory, a file, a 
pipe, a spooler queue or a serial device queue. 
Syntax 

MyRc = NetGetInfo(NETACCESS, 'Access', ServerName, ResourceName)

  
Parameters 
The parameters specified are: 
'Access'  The REXX variable receiving the result. The variable is divided 
          into: 
   o Access.count 
     The number of access controls profiles available for the resource 
   o Access.audit 
     The auditing flags. 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. 
      - -none- or N  Do not perform any auditing 
   o Access.i.ugname 
     The user account or group name. The variable i has a value from 1 to 
     Access.count 
   o Access.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 
ServerName The server computer name 
Resource Name The name of the resource 
  
Note 
The serverName parameter can be specified as '' for a local server.   
Example   
/* Add a access control profile for a resource */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETACCESS = 10
SrvName    = '\\FSC30DCR'
ResourceName = 'D:\APPS\NETPROG'

myRc = NetGetInfo(NETACCESS, 'Access', SrvName, ResourceName)

if myRc <> '0' then do
 say 'Got error from NetGetInfo() ' myRc
 call DropLsRxutFuncs
 exit 9
end

say
say 'Count:   ' Access.count
say 'Audit:   ' Access.audit

do i=1 to Access.count
 say
 say Access.i.ugname
 say Access.i.access
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   
Count:    2
Audit:    owdp

USERS
RG

GUESTS
RG



Inf-HTML End Run - Successful