IBM OS/2 LAN Server REXX Utility DLL


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


NETACCESSUSERPERMS Get Info


The function obtains for a specified userid or group the permission to a 
resource. The resource can be a file, directory, drive, pipe, queue or 
logical resource and can be specified remotely by a UNC path. 
Syntax 


MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)

  
Parameters 
The parameters specified are 
'UsrPerms'    The REXX variable receiving the result. The variable is 
              divided into: 
   o UsrPerms.perms 
     The access control profile available for the resource. The access 
     control flags are as follows: 
      - N None 
      - A Attribute 
      - R Read 
      - W Write 
      - C Create 
      - X Execute 
      - D Delete 
      - P Permissions 
SrvName       The server computer name 
NetResName    The name of the resource 
UgName        User account or group name 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Get access control profile for a resource and a user or group */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETACCESSUSERPERMS = 12
SrvName            = '\\FSC30DCR'
NetResName         = 'C:\IBMLAN\NETPROG'
UgName             = 'USERS'

MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)

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

say
say 'Access Perms: ' UsrPerms.perms

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   


Access Perms:  R



Inf-HTML End Run - Successful