CAC 2016-02-25 part 3

set_proc_required

set_procs_required:
     proc (a_procs_required, a_code);
          procs_required = a_procs_required;                /* copy to stack which will be wired */
          if ^CHECK_ACCESS (access_operations_$set_procs_required)
          then do;
                    a_code = error_table_$insufficient_access;
                    return;
               end;

          call SET_MY_PROCS_REQUIRED (procs_required, code);

          a_code = code;
          return;

DBG(460536043)> CPU0 TRACE:        37 set_procs_required:
DBG(460536043)> CPU0 TRACE: 00133:012610 0 000440627000 (EAX7 000440) 000440 627(0) 0 0 0 00
DBG(460536045)> CPU0 TRACE: 00133:012611 0 700034352120 (EPP2 PR7|34,N*) 700034 352(0) 1 0 1 00
DBG(460536047)> CPU0 TRACE: 00133:012612 0 201045272100 (TSP2 PR2|1045) 201045 272(0) 1 0 0 00
DBG(460536091)> CPU0 TRACE: 00133:012615 0 600032373520 (EPP7 PR6|32,N*) 600032 373(1) 1 0 1 00
DBG(460536093)> CPU0 TRACE: 00133:012616 0 700004371520 (EPP5 PR7|4,N*) 700004 371(1) 1 0 1 00
DBG(460536095)> CPU0 TRACE: 00133:012617 0 600132651500 (SPRI5 PR6|132) 600132 651(1) 1 0 0 00

DBG(460536097)> CPU0 TRACE:       168   procs_required = a_procs_required;              /* copy to stack which will be wired */
DBG(460536097)> CPU0 TRACE: 00133:012620 0 700002235120 (LDA PR7|2,N*) 700002 235(0) 1 0 1 00
DBG(460536099)> CPU0 TRACE: 00133:012621 0 000020377100 (ANAQ PR0|20) 000020 377(0) 1 0 0 00
DBG(460536101)> CPU0 TRACE: 00133:012622 0 600121755100 (STA PR6|121) 600121 755(0) 1 0 0 00

DBG(460536103)> CPU0 TRACE:       169   if ^CHECK_ACCESS (access_operations_$set_procs_required)
DBG(460536103)> CPU0 TRACE: 00133:012623 0 400306352120 (EPP2 PR4|306,N*) 400306 352(0) 1 0 1 00
DBG(460536105)> CPU0 TRACE: 00133:012624 0 600200252100 (SPRI2 PR6|200) 600200 252(0) 1 0 0 00
DBG(460536107)> CPU0 TRACE: 00133:012625 0 600174352100 (EPP2 PR6|174) 600174 352(0) 1 0 0 00
DBG(460536109)> CPU0 TRACE: 00133:012626 0 600202252100 (SPRI2 PR6|202) 600202 252(0) 1 0 0 00
DBG(460536111)> CPU0 TRACE: 00133:012627 0 600176352100 (EPP2 PR6|176) 600176 352(0) 1 0 0 00
DBG(460536113)> CPU0 TRACE: 00133:012630 0 010000431007 (FLD 010000,DL) 010000 431(0) 0 0 0 07
DBG(460536115)> CPU0 TRACE: 00133:012631 0 200000757100 (STAQ PR2|0) 200000 757(0) 1 0 0 00
DBG(460536117)> CPU0 TRACE: 00133:012632 0 000511670004 (TSP4 000511,IC) 000511 670(0) 0 0 0 04

CHECK_ACCESS:
     proc (a_access_op) returns (bit (1) aligned);

          access_op = a_access_op;
          have_access = "0"b;
          return_code = 0;

          if pds$process_group_id = INITIALIZER then return ("1"b);

          call status_$get_user_raw_mode (SPRQ_ACS_DIR, SPRQ_ACS_SEG, "", mode, code);
          if code ^= 0
          then do;
                    call syserr$error_code (SYSERR_LOG_OR_PRINT, code,
                         "set_procs_required: Failed to check access for ^a.", pds$process_group_id);
                    return ("0"b);
               end;

          if (mode & RW_ACCESS) = RW_ACCESS
          then have_access = "1"b;
          else return_code = error_table_$insufficient_access;

          string (event_flags) = ""b;
          event_flags.priv_op = "1"b;
          event_flags.grant = have_access;

          call access_audit_$log_general ("set_procs_required", level$get (), string (event_flags), access_op, "",
               return_code, null (), 0);
          return (have_access);

     end CHECK_ACCESS;

DBG(460536119)> CPU0 TRACE:       350 CHECK_ACCESS:
DBG(460536119)> CPU0 TRACE: 00133:013343 0 600136650100 (SPRI4 PR6|136) 600136 650(0) 1 0 0 00
DBG(460536121)> CPU0 TRACE: 00133:013344 0 600140252100 (SPRI2 PR6|140) 600140 252(0) 1 0 0 00

DBG(460536123)> CPU0 TRACE:       358   access_op = a_access_op;
DBG(460536123)> CPU0 TRACE: 00133:013345 0 200002235120 (LDA PR2|2,N*) 200002 235(0) 1 0 1 00
DBG(460536125)> CPU0 TRACE: 00133:013346 0 600144755100 (STA PR6|144) 600144 755(0) 1 0 0 00

DBG(460536127)> CPU0 TRACE:       359   have_access = "0"b;
DBG(460536127)> CPU0 TRACE: 00133:013347 0 600145450100 (STZ PR6|145) 600145 450(0) 1 0 0 00

DBG(460536129)> CPU0 TRACE:       360   return_code = 0;
DBG(460536129)> CPU0 TRACE: 00133:013350 0 600146450100 (STZ PR6|146) 600146 450(0) 1 0 0 00

DBG(460536131)> CPU0 TRACE:       362   if pds$process_group_id = INITIALIZER then return ("1"b);
DBG(460536131)> CPU0 TRACE: 00133:013351 0 600044370120 (EPP4 PR6|44,N*) 600044 370(0) 1 0 1 00
DBG(460536135)> CPU0 TRACE: 00133:013353 0 040004106500 (CMPC PR0|40004) 040004 106(1) 0 0 0 00
DBG(460536137)> CPU0 TRACE: 00133:013356 0 000004601004 (TNZ 000004,IC) 000004 601(0) 0 0 0 04

DBG(460536139)> CPU0 TRACE:       364   call status_$get_user_raw_mode (SPRQ_ACS_DIR, SPRQ_ACS_SEG, "", mode, code);
DBG(460536139)> CPU0 TRACE: 00133:013362 0 777113352004 (EPP2 777113,IC) 777113 352(0) 0 0 0 04
DBG(460536141)> CPU0 TRACE: 00133:013363 0 600264252100 (SPRI2 PR6|264) 600264 252(0) 1 0 0 00
DBG(460536143)> CPU0 TRACE: 00133:013364 0 777103352004 (EPP2 777103,IC) 777103 352(0) 0 0 0 04
DBG(460536145)> CPU0 TRACE: 00133:013365 0 600266252100 (SPRI2 PR6|266) 600266 252(0) 1 0 0 00
DBG(460536147)> CPU0 TRACE: 00133:013366 0 600260352100 (EPP2 PR6|260) 600260 352(0) 1 0 0 00
DBG(460536149)> CPU0 TRACE: 00133:013367 0 600270252100 (SPRI2 PR6|270) 600270 252(0) 1 0 0 00
DBG(460536151)> CPU0 TRACE: 00133:013370 0 600112352100 (EPP2 PR6|112) 600112 352(0) 1 0 0 00
DBG(460536153)> CPU0 TRACE: 00133:013371 0 600272252100 (SPRI2 PR6|272) 600272 252(0) 1 0 0 00
DBG(460536155)> CPU0 TRACE: 00133:013372 0 600104352100 (EPP2 PR6|104) 600104 352(0) 1 0 0 00
DBG(460536157)> CPU0 TRACE: 00133:013373 0 600274252100 (SPRI2 PR6|274) 600274 252(0) 1 0 0 00
DBG(460536159)> CPU0 TRACE: 00133:013374 0 777124352004 (EPP2 777124,IC) 777124 352(0) 0 0 0 04
DBG(460536161)> CPU0 TRACE: 00133:013375 0 600276252100 (SPRI2 PR6|276) 600276 252(0) 1 0 0 00
DBG(460536163)> CPU0 TRACE: 00133:013376 0 777121352004 (EPP2 777121,IC) 777121 352(0) 0 0 0 04
DBG(460536165)> CPU0 TRACE: 00133:013377 0 600300252100 (SPRI2 PR6|300) 600300 252(0) 1 0 0 00
DBG(460536167)> CPU0 TRACE: 00133:013400 0 777116352004 (EPP2 777116,IC) 777116 352(0) 0 0 0 04
DBG(460536169)> CPU0 TRACE: 00133:013401 0 600302252100 (SPRI2 PR6|302) 600302 252(0) 1 0 0 00
DBG(460536171)> CPU0 TRACE: 00133:013402 0 777125352004 (EPP2 777125,IC) 777125 352(0) 0 0 0 04
DBG(460536173)> CPU0 TRACE: 00133:013403 0 600304252100 (SPRI2 PR6|304) 600304 252(0) 1 0 0 00
DBG(460536175)> CPU0 TRACE: 00133:013404 0 777125352004 (EPP2 777125,IC) 777125 352(0) 0 0 0 04
DBG(460536177)> CPU0 TRACE: 00133:013405 0 600306252100 (SPRI2 PR6|306) 600306 252(0) 1 0 0 00
DBG(460536179)> CPU0 TRACE: 00133:013406 0 600262621100 (EAX1 PR6|262) 600262 621(0) 1 0 0 00
DBG(460536181)> CPU0 TRACE: 00133:013407 0 024000431007 (FLD 024000,DL) 024000 431(0) 0 0 0 07
DBG(460536183)> CPU0 TRACE: 00133:013410 0 400336352120 (EPP2 PR4|336,N*) 400336 352(0) 1 0 1 00
DBG(460536185)> CPU0 TRACE: 00133:013411 0 000622700100 (TSX0 PR0|622) 000622 700(0) 1 0 0 00

DBG(460545475)> CPU0 TRACE:       365   if code ^= 0
DBG(460545475)> CPU0 TRACE: 00133:013412 0 600104236100 (LDQ PR6|104) 600104 236(0) 1 0 0 00
DBG(460545477)> CPU0 TRACE: 00133:013413 0 000034600004 (TZE 000034,IC) 000034 600(0) 0 0 0 04

DBG(460545479)> CPU0 TRACE:       372   if (mode & RW_ACCESS) = RW_ACCESS
DBG(460545479)> CPU0 TRACE: 00133:013447 0 600112235100 (LDA PR6|112) 600112 235(0) 1 0 0 00
DBG(460545481)> CPU0 TRACE: 00133:013450 0 500000375003 (ANA 500000,DU) 500000 375(0) 0 0 0 03
DBG(460545483)> CPU0 TRACE: 00133:013451 0 500000115003 (CMPA 500000,DU) 500000 115(0) 0 0 0 03
DBG(460545485)> CPU0 TRACE: 00133:013452 0 000004601004 (TNZ 000004,IC) 000004 601(0) 0 0 0 04

DBG(460545487)> CPU0 TRACE:       374   else return_code = error_table_$insufficient_access;

Okay, insufficient access…

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License