home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Collection - Online Library - January 1996 / CKITOS2196.ISO / diskette / gg244043.dsk / unc.dsk / LS30UTIL / LASNACC.CMD < prev    next >
OS/2 REXX Batch file  |  1993-03-09  |  3KB  |  90 lines

  1. /*******************************************************************/
  2. /* LASNACC.CMD This procedure returns the alias access control     */
  3. /*             profiles for logon assignments and assigned         */
  4. /*             applications. For external resources access control */
  5. /*             profiles are not returned.                          */
  6. /*                                                                 */
  7. /* Return value examples:                                          */
  8. /*                                                                 */
  9. /*               D=  ALIAS    RWC                                  */
  10. /*               D=  ALIAS8   external resource                    */
  11. /*               A=  ALIAS1   RWC                                  */
  12. /*               A=  ALIAS2     N                                  */
  13. /*               A=  ALIAS3     R                                  */
  14. /*                                                                 */
  15. /* The complete path is not displayed, only the alias name.        */
  16. /*                                                                 */
  17. /*******************************************************************/
  18.  
  19. parse upper arg userId assignmentType dummyArg
  20.  
  21. if userId = '' then do
  22.  call dspHelp;
  23.  exit 9
  24. end
  25.  
  26. if assignmentType = '' then
  27.  assignmentType = 'ALL'
  28.  
  29. call LoadFuncs; /* Load DLL utility functions */
  30.  
  31. rc = GetLogonAsnAcp(userId, assignmentType, 'appList.')
  32.  
  33. if rc = '0' then do
  34.  if appList.0 = 0 then do /* No ACPs found */
  35.   say
  36.   say 'No assignments found'
  37.  end
  38.  else do
  39.   say
  40.   do i=1 to appList.0
  41.    say appList.i
  42.   end
  43.  end
  44. end
  45. else do
  46.  say 'Error occured. Returncode from GetLogonAsnAcp() was: '
  47.  say rc
  48. end
  49.  
  50. call DropFuncs
  51. exit 0
  52.  
  53. /*************************************************************/
  54. /* Load DLL Functions                                        */
  55. /*************************************************************/
  56. LoadFuncs:
  57.  
  58.  /* Load LS30UT.DLL functions */
  59.  call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  60.  call LoadLs30utFuncs
  61.  
  62. return
  63.  
  64. /*************************************************************/
  65. /* Drop DLL Functions                                        */
  66. /*************************************************************/
  67. DropFuncs:
  68.  
  69.  /* Drop LS30UT.DLL functions */
  70.  call DropLs30utFuncs
  71.  
  72. return
  73.  
  74. /*************************************************************/
  75. /* Display help                                              */
  76. /*************************************************************/
  77. dspHelp:
  78.  
  79.  say 'Use LASNACC userId assignmentType'
  80.  say
  81.  say 'The userId must be supplied and the assignmentType values can be:'
  82.  say
  83.  say 'ALIAS  List access control profiles for alias'
  84.  say 'APPS   List access control profiles for applications'
  85.  say '       required alias resources'
  86.  say 'ALL    List all of above'
  87.  
  88. return
  89.  
  90.