User Tools

Site Tools


ibm:vm370-lib:cp:dmkalg.assemble_src

DMKALG Source

References

Source Listing

DMKALG.ASSEMBLE.txt
  1. ALG TITLE 'DMKALG (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SOURCE 00002000
  3. *. 00003000
  4. * MODULE NAME - DMKALG 00004000
  5. * 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * PROCESS THE AUTOLOG COMMAND - A COMMAND WHICH CAUSES 00009000
  10. * ONE USER TO BE LOGGED ON BY ANOTHER 00010000
  11. * 00011000
  12. * COMMAND LINE FORMAT - 00012000
  13. * 00013000
  14. * +-----------+-------------------------------------------+ 00014000
  15. * | AUTOLOG | USERID PASSWORD < FIRST VREAD DATA > | 00015000
  16. * +-----------+-------------------------------------------+ 00016000
  17. * 00017000
  18. * ATTRIBUTES - 00018000
  19. * 00019000
  20. * REENTRANT, PAGEABLE, CALLED VIA SVC 00020000
  21. * 00021000
  22. * ENTRY POINT - 00022000
  23. * 00023000
  24. * DMKALGON - AUTOLOG A USER 00024000
  25. * 00025000
  26. * ENTRY CONDITIONS - 00026000
  27. * 00027000
  28. * GPR 9 = ADDRESS OF COMMAND BUFFER 00028000
  29. * GPR 11 = ADDRESS OF INVOKER'S VMBLOK 00029000
  30. * GPR 12 = ADDRESS OF DMKALG 00030000
  31. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00031000
  32. * 00032000
  33. * EXIT CONDITIONS - 00033000
  34. * 00034000
  35. * 00035000
  36. * GPR 2 = 0 IF AUTOLOG WAS SUCCESSFUL 00036000
  37. * GPR 2 HOLDS ERROR-CODE (SEE ERROR MESSAGES) IF AUTOLOG FAILED 00037000
  38. EJECT 00038000
  39. * 00039000
  40. * OPERATION - 00040000
  41. * 00041000
  42. * THE FOLLOWING ROUTINE WILL ATTEMPT TO LOGON ANOTHER 00042000
  43. * USER AND PLACE HIM IN DISCONNECTED STATE. ANY DATA 00043000
  44. * ON THE COMMAND LINE BEYOND THE PASSWORD WILL BE PASSED 00044000
  45. * AS A COMMAND TO SATISFY THE FIRST VIRTUAL MACHINE 00045000
  46. * CONSOLE READ. GENERAL STEPS TAKEN IN THIS PROCESS 00046000
  47. * INCLUDE THE FOLLOWING: 00047000
  48. * 00048000
  49. * FROM DMKALG, CALL DMKBLD TO GET A NEW VMBLOK; THEN 00049000
  50. * CALL DMKLOGB TO 00050000
  51. * REQUEST THE USER BE LOGGED ON. ANY LOG ERROR MESSAGES 00051000
  52. * (AS OPPOSED TO LNK) RESULTING FROM THIS PROCESS WILL 00052000
  53. * BE SENT TO THE USER WHO ISSUED THE AUTOLOG COMMAND. 00053000
  54. * ALL OTHER ERROR MESSAGES WILL BE SENT TO THE NEW 00054000
  55. * USER. 00055000
  56. * 00056000
  57. * ON RETURN FROM DMKLOGB, DMKALG WILL CHECK FOR ERRORS. 00057000
  58. * IF AN ERROR RESULTED, DMKUSO WILL BE CALLED TO GET 00058000
  59. * RID OF THE ILL FATED AUTOLOGGED USER. IF THE ERROR 00059000
  60. * WAS DUE TO A BAD PASSWORD, CONTROL IS PASSED TO THE 00060000
  61. * PASSWORD COUNT ROUTINE IN COMMON CODE. THIS COMMON 00061000
  62. * CODE KEYS OFF OF THE AUTOLOG BIT AND THE VMVIRCF BIT. 00062000
  63. * THE AUTOLOG BIT IS SET BY DMKALG, DMKLOGB AND 00063000
  64. * DMKLOGOP. THE VMVIRCF BIT WILL NEVER BE SEEN HERE 00064000
  65. * FOR AN AUTOLOGGED USER; IT MAY BE ON FOR THE COMMAND 00065000
  66. * ISSUING USER. 00066000
  67. * 00067000
  68. * IF NO ERROR OCCURRED, PROCEED TO HANDLE THE FIRST 00068000
  69. * COMMAND BUFFER, TWIDDLE BITS TO LET THE NEW USER RUN, 00069000
  70. * CALL DMKSCHDL FOR THE SAME REASON AND, NOW THAT IT 00070000
  71. * WORKED OK, RESET THE BAD PASSWORD COUNT. 00071000
  72. * 00072000
  73. * NOTE - SAVEWRK1: AUTOLOG+PSWRDCK = AUTOLOG COMMAND 00073000
  74. * AUTOLOG ONLY = CPI SYS OP LOGON 00074000
  75. * 00075000
  76. * RESPONSES - 00076000
  77. * 00077000
  78. * AUTO LOGON *** USERID USERS = NNN 00078000
  79. * 00079000
  80. * ERROR MESSAGES - SEE LOGON COMMAND ALSO 00080000
  81. * 00081000
  82. * DMKALG115 - INVALID, EXCESSIVE INCORRECT PASSWORDS 00082000
  83. *. 00083000
  84. EJECT 00084000
  85. DMKALG CSECT 00085000
  86. DC CL8'DMKALG' PAGEABLE MODULE IDENTIFIER 00086000
  87. * ENTRY DMKALGON AUTOLOG A USER 00087000
  88. EXTRN DMKBLDVM 00088000
  89. EXTRN DMKLOGB 00089000
  90. EXTRN DMKSCNVD 00090000
  91. EXTRN DMKSCHDL 00091000
  92. EXTRN DMKSTKCP 00092000
  93. EXTRN DMKERMSG 00093000
  94. EXTRN DMKCVTBH 00094000
  95. EXTRN DMKSCNVN 00095000
  96. EXTRN DMKSYSJR @V60BBBB 00095500
  97. SPACE 1 00096000
  98. USING PSA,R0 FOR ALL ENTRIES 00097000
  99. USING VMBLOK,R11 00098000
  100. USING DMKALG,R12 00099000
  101. USING SAVEAREA,R13 00100000
  102. SPACE 2 00101000
  103. COPY OPTIONS 00102000
  104. EJECT 00103000
  105. DMKALGON RELOC @VM03066 00104000
  106. ST R11,SAVEWRK8 SAVE CMD VMBLOK FOR ERRORS @VM03066 00105000
  107. LR R10,R11 IN R10 TOO, FOR DMKLOGB @VM03066 00106000
  108. MVI SAVEWRK1,AUTOLOG+PSWRDCK AUTOLOG CMD PARMS @VM03066 00107000
  109. SPACE 00108000
  110. L R4,=A(DMKSYSJR) GET ADDRESS OF JSPCBLOK @V60BBBB 00108100
  111. USING JPSCBLOK,R4 TELL ASSEMBLER @V60BBBB 00108200
  112. TM LOGONJRL,L'LOGONJRL AUTOLOG JOURNALING? @V60BBBB 00108300
  113. BZ LOGA0 BR IF NOT @V60BBBB 00108400
  114. CLC VMPSWDCA,JPSLOGDS LIMIT REACHED? @V60BBBB 00108500
  115. BL LOGA1 BR IF NOT @V60BBBB 00108600
  116. B ERROR115 TOO MANY- SEND ERROR MESSAGE @V60BBBB 00108700
  117. LOGA0 TM VMOSTAT,VMVIRCF ISSUED FROM VIRT MACHINE? @VM03198 00109000
  118. BZ LOGA1 NOPE, CONTINUE... @VM03198 00110000
  119. IC R14,VMPSWDCT YUP, GET THE CURRENT PSWD COUNT @VM03198 00111000
  120. N R14,F240 ISOLATE THE HI DIGIT OF THE BYTE @VM03198 00112000
  121. LA R15,LOGLIMIT*16 GET COMPARAND @VM03198 00113000
  122. CR R14,R15 WELL?.... @VM03198 00114000
  123. BH ERROR115 TOO MANY BAD GUESSES, SORRY. @VM03198 00115000
  124. SPACE 00116000
  125. LOGA1 L R8,=C'AUTO' INDICATE AUTOLOG TO DMKBLD @VM03198 00117000
  126. CALL DMKBLDVM BUILD NEW VMBLOK @V305535 00118000
  127. OI VMOSTAT,VMDISC+VMCF FLAG DISC AND CONS FUNC @VA09214 00119000
  128. SR R0,R0 CLEAR PSUEDO READ PARAMETER @V305535 00120000
  129. SR R1,R1 . . @V305535 00121000
  130. CALL DMKLOGB ATTEMPT AUTOLOG @V305535 00122000
  131. B ALGERR UNSUCCESFUL @V305535 00123000
  132. LTR R2,R2 SUCCESFUL? @V305535 00124000
  133. BNZ ALGERR NO @V305535 00125000
  134. LH R8,VMVTERM DISPLACEMENT OF VIRT. CONS @V305535 00126000
  135. LTR R8,R8 DO WE HAVE A VIRT CONS? @VA07613 00126300
  136. BM NOCONS NO, SKIP HIM @VA07613 00126600
  137. AL R8,VMDVSTRT FORM ABSOLUTE ADDRESS OF CONS. @V305535 00127000
  138. CALL DMKSCNVD GET ALL VIRTUAL I/O BLOKS @V305535 00128000
  139. USING VDEVBLOK,R8 @V305535 00129000
  140. OI VDEVCFLG,VDEVAUCR FLAG FOR FIRST AUTO READ @V305535 00130000
  141. LA R0,BUFSIZE GET A FULL BUFFER @V305535 00131000
  142. CALL DMKFREE @V305535 00132000
  143. L R9,SAVER9 ADDRESS OF INPUT BUFFER @V305535 00133000
  144. LM R2,R3,BUFNXT-BUFFER(R9) GET NEXT & LENGTH FLDS @VM03066 00134000
  145. SLR R0,R0 ZIP FOR STORE @VM03066 00135000
  146. ST R0,BUFCNT-BUFFER(R9) GET NO MORE FROM THIS BUFFR@VM03066 00136000
  147. CLI 0(R2),C' ' IS NEXT CHAR A BLANK? @VM03066 00137000
  148. BE LOGA3 YES, SKIP @VM03066 00138000
  149. LTR R3,R3 IS THERE ANY DATA LEFT? @VM03066 00139000
  150. BP LOGA4 YES, GO MOVE IT. @VM03066 00140000
  151. LOGA2 SLR R3,R3 MAKE SURE COUNT IS 0 THEN. @VM03066 00141000
  152. B LOGA5 AND PROCEED WITH NULL BUFFER @VM03066 00142000
  153. SPACE 00143000
  154. LOGA3 S R3,F1 REMOVE BLANK AFTER CMD @VM03066 00144000
  155. BNP LOGA2 NONE OR ONE, NO DATA TO PASS, BR.@VM03066 00145000
  156. LA R2,1(R2) BUMP PAST THE BLANK @VM03066 00146000
  157. LOGA4 BCTR R3,0 DECREMENT FOR EXECUTE @VM03066 00147000
  158. EX R3,MOVEREAD MOVE REMAINING DATA FOR 1ST VREAD@VM03066 00148000
  159. LA R3,1(R3) R3 BACK TO USER DATA COUNT @VM03066 00149000
  160. LOGA5 ST R1,BUFNXT-BUFFER(R1) NEXT BYTE = 1ST BYTE @VM03066 00150000
  161. ST R3,BUFCNT-BUFFER(R1) SAVE REMAINING LENGTH @VM03066 00151000
  162. L R7,VDEVCON ADDRESS OF VCONCTL BLOCK @VM03066 00152000
  163. USING VCONCTL,R7 ADDRESS THE BLOCK @VM03066 00153000
  164. ST R1,VCONRBUF FILL IN READ BUFFER ADDRESS @VM03066 00154000
  165. MVC VCONRBSZ,=AL2(BUFSIZE) FILL IN BUFFER SIZE HRC101DK 00155490
  166. STC R3,VCONRCNT+1 FILL IN READ DATA COUNT @VM03066 00156000
  167. DROP R7,R8 @V305535 00157000
  168. NOCONS EQU * @VA07613 00157500
  169. NI VMRSTAT,255-VMCFWAIT CLEAR @V305535 00158000
  170. NI VMOSTAT,255-VMCF-VMSLEEP CLEAR @V305535 00159000
  171. CALL DMKSCHDL INFORM SCHEDULAR OF NEW VMBLOK @V305535 00160000
  172. SPACE 1 00161000
  173. LOGEXTA DS 0H @V408246 00162000
  174. L R1,SAVER11 NO,SWITCH TIMERS AND LOCKS 00163000
  175. SWTCHVM 00164000
  176. LOGEXIT EQU * 00165000
  177. LOGEXITR EXIT REALLY EXIT. 00166000
  178. SPACE 1 00167000
  179. MOVEREAD MVC 0(*-*,R1),0(R2) MOVE FROM OLD BUFFER TO NEW @VM03066 00168000
  180. * 00169000
  181. EJECT 00170000
  182. ALGERR ST R2,SAVER2 SAVE ERROR CODE FROM DMKLOGB @VM03066 00171000
  183. TM SAVER2,OPMSG LET USO BLAB TO OP ABOUT THIS? @VM03066 00173000
  184. MVI SAVER2,X'00' CLEAR OUT ANY FLAG FOR CALLER @VM03066 00174000
  185. BO NOSUPRES YES, DON'T SET SUPPRESS PARM @VA13026 00175000
  186. OI VMSVSTAT,VMLGNMSG SET SUPPRESS MESSAGE PARM @VA13026 00175600
  187. NOSUPRES DS 0H @VA13026 00176200
  188. OI VMOSTAT,VMKILL MAKE SURE KILL FLAG UP @V408246 00177000
  189. OI VMSVSTAT,VMLGFORC INDICATE THAT USER WAS FORCED @VA13026 00177200
  190. NI VMOSTAT,X'FF'-VMCF LET THE FORCE PROCEED @VA09214 00177500
  191. LA R0,CPEXSIZE GET CPEXBLOK @V408246 00178000
  192. CALL DMKFREE @V408246 00179000
  193. USING CPEXBLOK,R1 @V408246 00180000
  194. STM R0,R15,CPEXR0 SAVE ALL REGS. @V408246 00181000
  195. L R0,ADSPCH DISPATCH ENTRY @V408246 00182000
  196. ST R0,CPEXR12 @V408246 00183000
  197. ST R0,CPEXADD @V408246 00184000
  198. CALL DMKSTKCP STACK NEW BLOCK @V408246 00185000
  199. DROP R1 @V408246 00186000
  200. LR R1,R10 SWITCH TO VMBLOK IN R10 00187000
  201. SWTCHVM 00188000
  202. ALGERRA DS 0H @V408246 00189000
  203. BAL R8,CLEARBUF SET REMAINING BUFFER DATA = 0 @VM03066 00190000
  204. CLI SAVER2+3,50 BAD PASSWORD? @V305535 00191000
  205. BNE LOGEXIT NOPE, ALL DONE. @VM03198 00192000
  206. TM LOGONJRL,L'LOGONJRL AUTOLOG JOURNALING? @V60BBBB 00192100
  207. BNO ALGERRF BR IF NOT @V60BBBB 00192200
  208. IC R14,VMPSWDCA GET CURRENT COUNT OF INVALID @V60BBBB 00192300
  209. * LINK + AUTOLOG PASSWORDS @V60BBBB 00192400
  210. LA R14,1(,R14) BUMP IT BY ONE @V60BBBB 00192500
  211. STC R14,VMPSWDCA STUFF IT @V60BBBB 00192600
  212. B LOGEXIT DONE NOW @V60BBBB 00192700
  213. SPACE 1 00192800
  214. ALGERRF DS 0H @V60BBBB 00192900
  215. TM VMOSTAT,VMVIRCF YES, CMD ISSUED FROM VIRT MACHIN@VM03198 00193000
  216. BZ LOGEXIT NOPE, FROM CP, THATS OK; DONE. @VM03198 00194000
  217. IC R14,VMPSWDCT GET THE CURRENT COUNT @VM03198 00195000
  218. LA R14,16(R14) AUTOLOG PASSWORD CT +1 (HI DIGIT)@VM03198 00196000
  219. STC R14,VMPSWDCT AND RE-SAVE @VM03198 00197000
  220. B LOGEXIT DONE NOW. @VM03198 00198000
  221. SPACE 00199000
  222. CLEARBUF L R9,SAVER9 GET ORIGINAL COMMAND BUFFER @VM03066 00200000
  223. SLR R7,R7 CLEAR OUT REMAINING DATA COUNT @VM03066 00201000
  224. ST R7,BUFCNT-BUFFER(R9) AND SAVE @VM03066 00202000
  225. BR R8 RETURN TO CALLER @VM03066 00203000
  226. SPACE 00204000
  227. EJECT 00205000
  228. * ERROR RETURNS: 00206000
  229. * 00207000
  230. ERROR115 LA R0,7 '$INVALD; INVALD PSWDCT EXCEEDED'@VM03198 00208000
  231. LA R1,VMCOMND R0 = LENGTH, R1 = A(C'AUTOLOG') @VM03198 00209000
  232. LA R2,115 R2 = ERROR MSG NUMBER @VM03198 00210000
  233. ERRJOIN3 ST R2,SAVER2 RETURN ERROR CODE TO OUR CALLER 00211000
  234. ERRJOIN4 ICM R0,B'1110',DMKALG+3 'ALG' IDENTIFIER INTO R0, 00212000
  235. ICM R2,B'1000',HEX80 SIGNAL - RETURN TO LOGON PLEASE 00213000
  236. CALL DMKERMSG SEND ERROR MESSAGE @V305535 00214000
  237. B LOGEXIT 00215000
  238. EJECT 00216000
  239. CHARI DC C'I' @V4075A0 00217000
  240. HEX80 DC X'80' @V4075A0 00218000
  241. SPACE 2 00219000
  242. LTORG 00220000
  243. SPACE 2 00221000
  244. LOGLIMIT EQU 3 LIMIT OF HOW MANY "WRONG PASSWORDS" WE'LL TOLERATE 00222000
  245. EJECT 00223000
  246. PSA 00224000
  247. COPY SAVE 00225000
  248. * FLAG-BITS USED IN SAVEWRK1: 00226000
  249. * 00227000
  250. AUTOLOG EQU X'80' AUTOLOG CMD OR CPI SYS OP LOGON @VM03066 00228000
  251. PSWRDOK EQU X'40' PASSWORD OK - DON'T CALL DMKEPSWD 00229000
  252. NOIPL EQU X'20' NO AUTOMATIC IPL WANTED 00230000
  253. NONFATAL EQU X'10' ERROR(S) NONFATAL - GO READ NEXT UDEVBLOK 00231000
  254. RECON EQU X'08' RECONNECT PERFORMED 00232000
  255. R9FRE EQU X'04' R9 IN USE AS FREE-STORAGE BUFFER 00233000
  256. EXECF EQU X'02' RECONNECTED W/ VMCF STILL ON @VM03066 00234000
  257. PSWRDCK EQU X'01' AUTOLOG CMD - PASSWORD REQUIRED @VM03066 00235000
  258. SPACE 00236000
  259. * PARAMETER BITS PASSED TO DMKUSOFF 00237000
  260. * 00238000
  261. NOOPMSG EQU X'01' DONT SEND LOGOFF MSG TO SYS OP @VM03066 00239000
  262. SPACE 00240000
  263. * PARAMETER BITS PASSED FROM DMKLOG BACK TO DMKLOGA 00241000
  264. * 00242000
  265. OPMSG EQU X'80' LET USOFF SEND LOGOFF MSG TO OP @VM03066 00243000
  266. * MISCELLANEOUS EQUATES 00244000
  267. CON512 EQU 512 512 DOUBLEWORDS @V3E7466 00245000
  268. CON131 EQU 131 DMKLOG131E MESSAGE NUMBER @V3E7466 00246000
  269. CON95 EQU 95 DMKLOG095E @V3E7466 00247000
  270. LENGTH5 EQU 5 DATA LENGTH MSG 131E @V3E7466 00248000
  271. EJECT 00249000
  272. COPY EQU 00250000
  273. COPY VMBLOK 00251000
  274. COPY VBLOKS 00252000
  275. COPY IOBLOKS 00253000
  276. COPY CONBUF @V305535 00254000
  277. JPSCBLOK , @V60BBBB 00254500
  278. END DMKALG 00255000
ibm/vm370-lib/cp/dmkalg.assemble_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator