Table of Contents

DMKEPS Source

References

Source Listing

DMKEPS.ASSEMBLE.txt
  1. EPS TITLE 'DMKEPS (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SYSIN 00002000
  3. *********************************************************************** 00003000
  4. * 00004000
  5. * MODULE NAME - 00005000
  6. * 00006000
  7. * DMKEPS 00007000
  8. * 00008000
  9. * FUNCTION - 00009000
  10. * 00010000
  11. * TO PROMPT THE USER TO ENTER A PASSWORD, TYPE MASKING 00011000
  12. * CHARACTERS IF APPROPRIATE, READ THE PASSWORD FROM THE 00012000
  13. * TERMINAL, AND CHECK IT FOR A MATCH. 00013000
  14. * 00014000
  15. * ATTRIBUTES - 00015000
  16. * 00016000
  17. * REENTRANT, PAGEABLE, CALLED VIA SVC 00017000
  18. * 00018000
  19. * ENTRY POINT - 00019000
  20. * 00020000
  21. * DMKEPSWD 00021000
  22. * 00022000
  23. * ENTRY CONDITIONS - 00023000
  24. * 00024000
  25. * GPR 0 = 0, 1, 2, OR 3, INDICATING MSG TO BE TYPED AS FOLLOWS: 00025000
  26. * 0 = 'ENTER PASSWORD' 00026000
  27. * 1 = 'ENTER READ PASSWORD' 00027000
  28. * 2 = 'ENTER WRITE PASSWORD' 00028000
  29. * 3 = 'ENTER MULT PASSWORD' 00029000
  30. * GPR 0 = 4, 5, 6, OR 7, INDICATING THE SAME FOUR 00030000
  31. * MESSAGES AS ABOVE, BUT ALSO REQUESTING 00031000
  32. * THAT IF AN INVALID PASSWORD IS ENTERED 00032000
  33. * IT BE RETURNED IN REGISTERS 0 & 1. 00033000
  34. * GPR 1 = ADDRESS OF 8-BYTE PASSWORD TO BE COMPARED 00034000
  35. * GPR 11 = ADDRESS OF USER'S VMBLOK 00035000
  36. * GPR 12 = ADDRESS OF DMKEPSWD 00036000
  37. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00037000
  38. * 00038000
  39. * EXIT CONDITIONS - 00039000
  40. * 00040000
  41. * CC = 0 IF PASSWORD MATCHES 00041000
  42. * CC = 1 OR 2 IF 'PASSWORD INCORRECT' 00042000
  43. * CC = 3 IF PERMANENT ERROR ON TERMINAL 00043000
  44. * 00044000
  45. * CALLS TO OTHER ROUTINES - 00045000
  46. * 00046000
  47. * DMKFREE - OBTAIN FREE STORAGE 00047000
  48. * DMKQCNWT - SEND PROMPTING MESSAGE TO TERMINAL 00048000
  49. * DMKQCNRD - READ PASSWORD FROM TERMINAL 00049000
  50. * DMKDSPCH - GO TO 'DISPATCH' WHILE AWAITING PASSWORD 00050000
  51. * DMKSCNFD - GET PASSWORD FROM TERMINAL INPUT LINE 00051000
  52. * DMKFRET - RETURN FREE STORAGE 00052000
  53. * 00053000
  54. * EXTERNAL REFERENCES - 00054000
  55. * 00055000
  56. * NONE 00056000
  57. * 00057000
  58. * TABLES / WORK AREAS / CONTROL BLOCKS 00058000
  59. * 00059000
  60. * VMBLOK 00060000
  61. * TERMINAL RDEVBLOK 00061000
  62. * 00062000
  63. * REGISTER USAGE - 00063000
  64. * 00064000
  65. * GPR 4 & 5 = HOLD PASSWORD TO BE COMPARED AGAINST (FROM CALLER) 00065000
  66. * GPR 8 = ADDRESS OF TERMINAL RDEVBLOK 00066000
  67. * GPR 9 = ADDRESS OF COMMAND BUFFER 00067000
  68. * GPR 11 = VMBLOK ADDRESS 00068000
  69. * GPR 12 = BASE REGISTER 00069000
  70. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00070000
  71. * 00071000
  72. * GPRS 0-3 AND 14-15 ARE WORK REGISTERS 00072000
  73. * 00073000
  74. * GPR 6-7, AND 10 ARE NOT USED 00074000
  75. * 00075000
  76. * NOTES - 00076000
  77. * 00077000
  78. * THIS MODULE WAS ORIGINALLY CONTAINED WITHIN THE DMKLNK 00078000
  79. * MODULE BUT WAS SEPERATED BECAUSE OF SPACE CONSIDERATIONS 00079000
  80. * AND ALSO BECAUSE THE ENTRY POINT NAME VIOLATED STANDARDS. 00080000
  81. * IT CURRENTLY CONTAINS A SINGLE ENTRY AT 'DMKEPSWD' AND 00081000
  82. * IS CALLED BY 'LOGON' AND 'LINK'. ------9/23/81 00082000
  83. EJECT 00083000
  84. * OPERATION - 00084000
  85. * 00085000
  86. * 1. SAVES PASSWORD TO BE COMPARED AGAINST IN TWO REGISTERS; 00086000
  87. * TYPES PROMPTING MESSAGE SPECIFIED BY GPR 0 AT INPUT - 00087000
  88. * EITHER 'ENTER PASSWORD', 'ENTER READ PASSWORD', 00088000
  89. * 'ENTER WRITE PASSWORD', OR 'ENTER MULT PASSWORD'. 00089000
  90. * 00090000
  91. * 2. CALLS DMKFREE TO GET A BUFFER INTO WHICH TO READ THE 00091000
  92. * PASSWORD. IF THE TERMINAL IS A TELETYPE, OR IF THE 00092000
  93. * TERMINAL RDEVBLOK INDICATES THAT THE TERMINAL DOES NOT 00093000
  94. * HAVE A PRINT-INHIBIT FEATURE, 'MASKING' CHARACTERS OF 00094000
  95. * OVERPRINTED H'S, S'S, AND *'S ARE TYPED ON THE TERMINAL 00095000
  96. * AFTER THE PROMPTING MESSAGE. OTHERWISE, A "BY-PASS" OR 00096000
  97. * PRINT-INHIBIT CHARACTER IS SENT TO THE TERMINAL VIA DMKQCNWT. 00097000
  98. * FOR A 3215-TYPE TERMINAL (WHERE NEITHER PRINT-INHIBIT, 00098000
  99. * BACKSPACE, NOR LINE-FEED WITHOUT CARRIAGE RETURN IS 00099000
  100. * AVAILABLE), A SIMPLE MASKING LINE OF "XXXXXXXX" IS 00100000
  101. * ALWAYS GIVEN. 00101000
  102. * 00102000
  103. * 3. DMKQCNRD IS CALLED TO HAVE THE PASSWORD ENTERED, AND 00103000
  104. * CONTROL IS THEN TRANSFERRED TO DMKDSPCH, WITH THE RETURN 00104000
  105. * SPECIFIED TO COME BACK TO STEP 4 WHEN THE PASSWORD HAS BEEN 00105000
  106. * ENTERED. 00106000
  107. * 00107000
  108. * 4. WHEN THE PASSWORD HAS BEEN ENTERED, DMKEPSWD CHECKS FOR 00108000
  109. * A PERMANENT ERROR ON THE TERMINAL (WHICH COULD OCCUR, FOR 00109000
  110. * EXAMPLE, IF THE USER TURNED OFF THE TERMINAL INSTEAD OF 00110000
  111. * ENTERING THE PASSWORD, OR IF THE COMMUNICATIONS LINE OPENED); 00111000
  112. * IF SO, RETURNS THE FREE STORAGE AND EXITS TO THE CALLER WITH 00112000
  113. * A CONDITION-CODE 3. 00113000
  114. * 00114000
  115. * IF THERE WAS NO PROBLEM OF THIS KIND, DMKEPSWD CHECKS FOR 00115000
  116. * A ZERO BYTE COUNT (I.E. NULL LINE WAS ENTERED). IF YES, GOES 00116000
  117. * TO STEP 9. 00117000
  118. * 00118000
  119. * 5. OTHERWISE, BLANK-FILLS AN EIGHT-BYTE AREA (SAVEWRK6) AND 00119000
  120. * CALLS DMKSCNFD TO OBTAIN THE PASSWORD. IF THE LINE WAS BLANK, 00120000
  121. * GOES TO STEP 9. IF THE PASSWORD WAS MORE THAN 8 BYTES, 00121000
  122. * TREATS AS AN ERROR (RETURNS CONDITION-CODE 2 TO THE CALLER 00122000
  123. * IN STEP 8 AFTER RETURNING THE FREE STORAGE IN STEP 7). 00123000
  124. EJECT 00124000
  125. * 6. IF THE PASSWORD IS NOT NULL, AND NO MORE THAN 8 BYTES, 00125000
  126. * THEN IT IS SAVED (IN SAVEWRK6) FOR COMPARING WITH THAT 00126000
  127. * PROVIDED AT ENTRY, JUST BEFORE RETURN IS MADE IN STEP 8. 00127000
  128. * 00128000
  129. * 7. THE FREE STORAGE USED FOR THE INPUT BUFFER IS NOW RETURNED 00129000
  130. * VIA A CALL TO DMKFRET. 00130000
  131. * 00131000
  132. * 8. FINALLY, THE PASSWORD ENTERED IS COMPARED AGAINST THE 00132000
  133. * PASSWORD PROVIDED BY THE CALLER, AND EXIT IS IMMEDIATELY MADE 00133000
  134. * TO THE CALLER, WITH THE CONDITION-CODE SET FROM THE COMPARE. 00134000
  135. * 00135000
  136. * 9. IF A NULL OR BLANK LINE WAS ENTERED, THEN THE MASKING 00136000
  137. * CHARACTERS ARE TYPED FOR EITHER TELETYPE OR OTHER TERMINAL, 00137000
  138. * AND REJOINS MAIN LOGIC AT STEP 3 ABOVE, TO HAVE THE USER 00138000
  139. * AGAIN ENTER THE PASSWORD. (FOR A 3215-TYPE TERMINAL, A 00139000
  140. * SIMPLE MASKING LINE OF "XXXXXXXX" IS GIVEN TO PROMPT THE 00140000
  141. * USER TO RE-ENTER THE PASSWORD.) 00141000
  142. * 00142000
  143. * PROMPTING MESSAGES: 00143000
  144. * 00144000
  145. * 'ENTER PASSWORD' 00145000
  146. * 'ENTER READ PASSWORD' 00146000
  147. * 'ENTER WRITE PASSWORD' 00147000
  148. * 'ENTER MULT PASSWORD' 00148000
  149. * 00149000
  150. EJECT 00150000
  151. COPY OPTIONS 00151000
  152. COPY LOCAL 00152000
  153. EJECT 00153000
  154. DMKEPS CSECT 00154000
  155. DC CL8'DMKEPS' MODULE IDENTIFIER 00155000
  156. EXTRN DMKQCNRD 00156000
  157. EXTRN DMKSCNFD 00157000
  158. USING PSA,R0 00158000
  159. USING VMBLOK,R11 00159000
  160. USING SAVEAREA,R13 00160000
  161. SPACE 00161000
  162. ENTRY DMKEPSWD "ENTER PASSWORD" ENTRY 00162000
  163. USING DMKEPSWD,R12 00163000
  164. SPACE 00164000
  165. DMKEPSWD ENTER "ENTER PASSWORD" ENTRY 00165000
  166. TM VMOSTAT,VMKILL IS THE USER BEING LOGGED OFF? 00166000
  167. BO SETCC3 YES--EXIT WITH CC=3 00167000
  168. LM R4,R5,0(R1) SAVE PASSWORD TO BE CHECKED AGAINST 00168000
  169. MVI SAVEWRK1,X'00' INIT INVALID PASSWORD RETURN FLAG 00169000
  170. C R0,F4 RETURN INVALID PASSWORD? @V60BBBB 00170000
  171. BL NOPASRET BR IF NOT @V60BBBB 00171000
  172. OI SAVEWRK1,RETPASS TURN ON FLAG TO CAUSE ANY @V60BBBB 00172000
  173. * INVALID PASSWORD TO BE RETURNED. 00173000
  174. S R0,F4 GET REGISTER BACK TO THE RANGE @V60BBBB 00174000
  175. * UNDERSTOOD BY FOLLOWING CODE. 00175000
  176. NOPASRET DS 0H @V60BBBB 00176000
  177. LTR R2,R0 R0 INTO R2 AND SET CONDITION-CODE 00177000
  178. MSG 'ENTER PASSWORD:' (TENTATIVELY) 00178000
  179. BZ ENTP02 TRF IF R0 WAS 0 - REGULAR PASSWORD. 00179000
  180. MSG 'ENTER READ PASSWORD:' (TENTATIVELY) 00180000
  181. S R2,F2 (R2) - 2 GIVES US CLUE TO R0 00181000
  182. BM ENTP02 TRF IF R0 WAS 1. 00182000
  183. MSG 'ENTER WRITE PASSWORD:' (TENTATIVELY) 00183000
  184. BZ ENTP02 TRF IF R0 WAS 2. 00184000
  185. MSG 'ENTER MULT PASSWORD:' (R0 MUST HAVE BEEN 3) 00185000
  186. * 00186000
  187. ENTP02 L R2,=A(NOTRESP) SET NON-COMMAND MSG @V60C2B8 00187000
  188. CALL DMKQCNWT,PARM=NORET(,R2) PROMPT USER @V60C2B8 00188000
  189. LA R0,BUFSIZE NOW WE NEED AN INPUT BUFFER 00189000
  190. CALL DMKFREE GET ONE FOR THE PASSWORD 00190000
  191. LR R9,R1 INTO R9 THE ADDRESS SHALL GO 00191000
  192. ENTP03 EQU * READ THE PASSWORD @V200820 00192000
  193. LA R0,BUFINLTH-2 SET EXPECTED INPUT COUNT 00193000
  194. CALL DMKQCNRD,PARM=(EDIT+UCASE+INHIBIT) @V6AE6AE 00194000
  195. BZ ENTP04 ALL O.K. - CHECK COUNT @VA04462 00195000
  196. C R2,F8 ATTN OR LINE DROP? @VA04462 00196000
  197. BH ENTP13 LINE DROP - EXIT GRACEFULLY @VA04462 00197000
  198. B ENTP03 RETRY THE READ @VA04462 00198000
  199. EJECT 00199000
  200. ENTP04 EQU * CHECK FOR VALID INPUT COUNT @VA04462 00200000
  201. LTR R2,R0 BE CAREFUL OF ZERO INPUT COUNT @V200820 00201000
  202. BNP ENTP03 TRY AGAIN IF NULL LINE @V200820 00202000
  203. USING BUFFER,R9 00203000
  204. STM R1,R2,BUFNXT STORE POINTER AND COUNT FOR SCANFLD 00204000
  205. MVC SAVEWRK6(8),BLANKS BLANK-FILL WHERE WE WILL PUT PASSWRD 00205000
  206. CALL DMKSCNFD GET THE PASSWORD 00206000
  207. BNZ ENTP03 TRY AGAIN IF NULL INPUT @V200820 00207000
  208. C R0,F8 PASSWORD MORE THAN 8 BYTES ? @VA11769 00208000
  209. BH PAS2LONG YES NOT VALID @VA15571 00209100
  210. LR R15,R0 00210000
  211. BCTR R15,0 00211000
  212. EX R15,SAVEPASS SAVE 8-BYTE BLANK-FILLED PASSWORD 00212000
  213. PASSFRET LA R0,BUFSIZE NOW GIVE BACK THE INPUT BUFFER 00213000
  214. LR R1,R9 ... 00214000
  215. CALL DMKFRET ... 00215000
  216. CL R4,SAVEWRK6 WELL, DOES THE PASSWORD MATCH ? 00216000
  217. BNE PASSCHK1 TRF IF NOT. @V60BBBB 00217000
  218. CL R5,SAVEWRK6+4 IF 1ST HALF MATCHES, CHECK 2ND HALF 00218000
  219. BE PASSEXIT RETURN IF ALL'S WELL @V60BBBB 00219000
  220. PASSCHK1 BALR R2,0 SAVE CONDITION CODE @V60BBBB 00220000
  221. TM SAVEWRK1,RETPASS SHOULD INVALID @V60BBBB 00221000
  222. * PASSWORD BE RETURNED ? 00222000
  223. BZ PASSCHK2 BR IF NOT @V60BBBB 00223000
  224. MVC SAVER0(L'UDIRPASS),SAVEWRK6 RETURN INVALID PSWD.@V60BBBB 00224000
  225. PASSCHK2 SPM R2 RESTORE CONDITION CODE @V60BBBB 00225000
  226. PASSEXIT DS 0H EXIT WITH CONDITION-CODE SET @V60BBBB 00226000
  227. EXIT FROM COMPARE. @V60BBBB 00227000
  228. SPACE 00227100
  229. PAS2LONG DS 0H HERE IF PASSWORD TOO LONG @VA15571 00227200
  230. BALR R2,0 SAVE CC - GOOD FOR REJECT @VA15571 00227300
  231. TM SAVEWRK1,RETPASS DO WE WANT INVALID PW? @VA15571 00227400
  232. BZ PASSCHK2 NO - GO RETURN. @VA15571 00227500
  233. MVC SAVER0(8),=C'TOO LONG' YES - GIVE HIM SUMMAT @VA15571 00227600
  234. B PASSCHK2 NOW RETURN @VA15571 00227700
  235. SPACE 00227800
  236. *********************************************************************** 00228000
  237. * * 00229000
  238. * FATAL ERROR FROM TERMINAL ON ENTRY OF PASSWORD: * 00230000
  239. * * 00231000
  240. *********************************************************************** 00232000
  241. ENTP13 LA R0,BUFSIZE GIVE BACK THE FREE STORAGE BUFFER 00233000
  242. LR R1,R9 ... 00234000
  243. CALL DMKFRET ... 00235000
  244. SETCC3 ST R11,SAVER11 BESURE TO RETURN CORRECT R11 00236000
  245. TM SAVEWRK1,RETPASS RETURN INVALID PASSWORD ? @VA11681 00237000
  246. BZ SETCC3A NO BRANCH @VA11681 00238000
  247. MVC SAVER0(8),=C'TERM/ERR' FILL INV PASSWORD AREA @VA11681 00239000
  248. SETCC3A EQU * @VA11681 00240000
  249. TM FFS,X'FF' SET CONDITION-CODE 3 00241000
  250. EXIT AND EXIT FORTHWITH. 00242000
  251. DROP R9,R12 @V200820 00243000
  252. EJECT 00244000
  253. *********************************************************************** 00245000
  254. * * 00246000
  255. * EXECUTED INSTRUCTIONS AND CONSTANTS: * 00247000
  256. * * 00248000
  257. *********************************************************************** 00249000
  258. * 00250000
  259. SAVEPASS MVC SAVEWRK6(*-*),0(R1) TO SAVE THE PASSWORD 00251000
  260. * 00252000
  261. RETPASS EQU X'80' FLAG BIT IN SAVEWRK1 @V60BBBB 00253000
  262. * WHICH INDICATES ANY 00254000
  263. * INVALID PASSWORDS ARE 00255000
  264. * TO BE RETURNED. 00256000
  265. LTORG 00257000
  266. EJECT 00258000
  267. OSVSCOM MSSCOM @V60B6B8 00259000
  268. DMKEPS CSECT @V60B6B8 00260000
  269. PSA (R0) 00261000
  270. * JPSCBLOK @V60BBBB 00262000
  271. COPY SAVE 00263000
  272. COPY VMBLOK (R11) 00264000
  273. COPY RBLOKS 00265000
  274. COPY EQU 00266000
  275. COPY UDIRECT 00267000
  276. COPY CONBUF 00268000
  277. END 00269000