home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3991 < prev    next >
Internet Message Format  |  1991-09-08  |  15KB

  1. Path: wupost!uunet!europa.asd.contel.com!darwin.sura.net!noc.sura.net!haven.umd.edu!mimsy!nrlvx1.nrl.navy.mil!koffley
  2. From: koffley@nrlvx1.nrl.navy.mil
  3. Newsgroups: alt.sources
  4. Subject: VMS UAF PROFILE part 17 of 18
  5. Message-ID: <1991Sep5.074820.561@nrlvx1.nrl.navy.mil>
  6. Date: 5 Sep 91 11:48:19 GMT
  7. Organization: NRL SPACE SYSTEMS DIVISION
  8. Lines: 509
  9.  
  10. -+-+-+-+-+-+-+-+ START OF PART 17 -+-+-+-+-+-+-+-+
  11. X`09            if (icount .le. 20) then
  12. X2`09               kilo = randi (lower,upper)
  13. X`09               if ((kilo .le. upper) .or. (kilo .ge. lower)) then
  14. X`09                  goto 1
  15. X`09               else
  16. X`09                  goto 2
  17. X`09               endif
  18. X`09            else
  19. X`09               write (6,*) 'Unable to resolve collision.'
  20. X`09               stop
  21. X`09            endif
  22. X`09         endif
  23. X`09      elseif (status .eq. ss$_wasclr) then
  24. X`09         call repeat (servers(bit_num), ' ')
  25. Xd`09         write (66,*) 'Inserting ',server(1:length),' at ',bit_num
  26. X`09         servers(bit_num)(1:length) = server(1:length)
  27. X`09      endif
  28. X`09   endif
  29. X
  30. X
  31. X`09return
  32. X`09end
  33. X
  34. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  35. Vcccc
  36. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  37. Vcccc
  38. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  39. Vcccc
  40. X
  41. X
  42. X
  43. X`09subroutine set_bit (a, bit_num, status)
  44. X
  45. X
  46. X
  47. X
  48. X`09include          '($SSDEF)'
  49. X
  50. X`09integer*4        a (1), bit_num, status, array_index, position, i
  51. X
  52. X
  53. X
  54. X`09call test_bit (a, bit_num, status)
  55. X
  56. X
  57. X`09if (status .eq. ss$_wasset) then
  58. Xc`09   write (6,*) 'SETBIT: bit was already set .... returning.'
  59. X`09   return
  60. X`09endif
  61. X
  62. X`09i = bit_num - 1
  63. X`09array_index = (i / 32) + 1
  64. X`09position = bit_num - (32 * (array_index-1)) - 1
  65. X`09`09
  66. X`09a (array_index) = ibset (a(array_index),position)
  67. X
  68. X`09status = ss$_normal
  69. X
  70. X`09return
  71. X`09end
  72. X
  73. X
  74. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  75. Vcc
  76. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  77. Vcc
  78. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  79. Vcc
  80. X
  81. X`09subroutine test_bit (a, bit_num, status)
  82. X
  83. X
  84. X
  85. X
  86. X`09include          '($SSDEF)'
  87. X
  88. X`09integer*4        a (1), bit_num, status, array_index, position, i,
  89. X`091                mask, c
  90. X
  91. X
  92. X
  93. X`09c = 0
  94. X`09mask = 0
  95. X
  96. X`09i = bit_num - 1
  97. X`09array_index = (i / 32) + 1
  98. X`09position = bit_num - (32 * (array_index-1)) - 1
  99. X`09mask = ibset (mask, position)
  100. X`09c = iand (a(array_index), mask)
  101. X
  102. X`09if (c .eq. mask) then
  103. X`09   status = ss$_wasset
  104. X`09else
  105. X`09   status = ss$_wasclr
  106. X`09endif
  107. X
  108. X
  109. X`09return
  110. X`09end
  111. X
  112. X
  113. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  114. Vcc
  115. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  116. Vcc
  117. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  118. Vcc
  119. X
  120. X
  121. X
  122. X`09subroutine clear_bit (a, bit_num, status)
  123. X
  124. X
  125. X
  126. X
  127. X`09include          '($SSDEF)'
  128. X
  129. X`09integer*4        a (1), bit_num, status, array_index, position, i
  130. X
  131. X
  132. X
  133. X`09call test_bit (a, bit_num, status)
  134. X
  135. X
  136. X`09if (status .eq. ss$_wasclr) then
  137. Xc`09   write (6,*) 'SETBIT: bit was already clear .... returning.'
  138. X`09   return
  139. X`09endif
  140. X
  141. X`09i = bit_num - 1
  142. X`09array_index = (i / 32) + 1
  143. X`09position = bit_num - (32 * (array_index-1)) - 1
  144. X`09`09
  145. X`09a (array_index) = ibclr (a(array_index),position)
  146. X
  147. X`09status = ss$_normal
  148. X
  149. X`09return
  150. X`09end
  151. X
  152. X
  153. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  154. Vcc
  155. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  156. Vcc
  157. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  158. Vcc
  159. X
  160. X
  161. X
  162. X`09subroutine zero_page (a)
  163. X
  164. X
  165. X`09integer*4             a(1)
  166. X
  167. X
  168. X`09do i = 1, 4
  169. X`09   a(i) = 0
  170. X`09enddo
  171. X
  172. X
  173. X`09return
  174. X`09end
  175. X
  176. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  177. Vcccc
  178. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  179. Vcccc
  180. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  181. Vcccc
  182. X
  183. X
  184. X`09subroutine find_set_bits (a, bit_num, num_longwords, status)
  185. X
  186. X
  187. X`09include      'sys$library:libdef.for/nolist'
  188. X`09include      '($ssdef)'
  189. X
  190. X`09integer*4           a(1), bit_num, status
  191. X
  192. X`09character*20         servers (184)
  193. X`09common    / server_info /  servers, bitmap_base_addr
  194. X
  195. Xd`09write (66,*)
  196. Xd`09write (66,*)
  197. Xd`09write (66,*)
  198. X`09
  199. X
  200. X`09bit_num = 0
  201. X
  202. X`09do bit_num = 1, num_longwords*32
  203. X`09   if (bit_num .gt. 0) then
  204. X`09      call test_bit (a, bit_num, status)
  205. X`09      if (status .eq. ss$_wasset) then
  206. Xd`09         write (66,*) 'bit ',bit_num,' was already set : ',servers(bit_n
  207. Vum)
  208. X`09      endif
  209. X`09   endif
  210. X`09enddo
  211. X
  212. X
  213. X`09return
  214. X`09end
  215. X
  216. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  217. Vcccc
  218. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  219. Vcccc
  220. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  221. Vcccc
  222. X
  223. X
  224. X
  225. X`09INTEGER*4 FUNCTION RANDI (LOWER,UPPER)
  226. X
  227. X`09INTEGER*4         LOWER, UPPER
  228. X`09REAL*4            RANDU
  229. X`09EXTERNAL          RANDU
  230. X
  231. X`09RANDI = LOWER + INT(RANDU() * (MAX(LOWER,UPPER) -`20
  232. X`091    MIN(LOWER,UPPER) + 1))
  233. X
  234. X
  235. X`09RETURN
  236. X`09END
  237. X
  238. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  239. Vccc
  240. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  241. Vccc
  242. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  243. Vccc
  244. X
  245. X`09REAL*4 FUNCTION RANDS (START)
  246. X
  247. X`09INTEGER*4 START,L,C,M,SEED
  248. X`09REAL*4 RANDU
  249. X
  250. X`09PARAMETER (L=1029,C=221591,M=1048576)
  251. X
  252. X`09SAVE SEED
  253. X`09DATA SEED /0/
  254. X
  255. X`09SEED = MOD (ABS(START),M)
  256. X
  257. X`09ENTRY RANDU()
  258. X
  259. X`09SEED = MOD(SEED*L+C,M)
  260. X`09RANDU = FLOAT (SEED) / M
  261. X
  262. X`09RETURN
  263. X`09END
  264. X
  265. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  266. Vccc
  267. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  268. Vccc
  269. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  270. Vccc
  271. X
  272. X
  273. X`09subroutine DISPLAY_PORTS_SUMMARY`20
  274. X
  275. X
  276. X
  277. X
  278. X`09implicit       none
  279. X
  280. X`09include              '($SSDEF)'
  281. X`09include              '($SMGDEF)'
  282. X`09include              '($TRMDEF)'
  283. X`09include              '($SYSSRVNAM)'
  284. X`09include              '($LIBDEF)'
  285. X
  286. X`09integer*4           bit_num
  287. X
  288. X`09character*20         servers (184)
  289. X`09common    / server_info /  servers, bitmap_base_addr
  290. X
  291. X`09common / SMG_data /  paste_ID, kybd_ID, num_rows, num_cols, display_ID,
  292. X`091                    mm_id
  293. X
  294. X`09integer*2           terminator
  295. X
  296. X`09integer*4           status, paste_ID, kybd_ID, num_rows,`20
  297. X`091                   num_cols, display_ID, mm_id, rows, cols, mask,
  298. X`092                   modifiers, zero / 0 /, max_chars, scroll_ID,
  299. X`093                   SMG$READ_STRING, num_q_elements, current_line,
  300. X`094                   num_scroll_lines, address, i, num, bitmap_base_addr
  301. X
  302. X`09logical             found
  303. X
  304. X`09character*50         out_str
  305. X`09character*5          in_string
  306. X
  307. X`09integer*4            length, len_trim, two / 2 /, one / 1 /, irow,
  308. X`091                    max_buffer_size, num_Longwords, num_bits_set
  309. X
  310. X`09external             len_trim, SMG$READ_STRING
  311. X
  312. X
  313. X
  314. X
  315. X
  316. X`09bit_num = 0
  317. X`09num_Longwords = (8 * 24) / 32
  318. X`09num_bits_set = 0
  319. X
  320. X`09do bit_num = 1, num_longwords*32
  321. X`09   if (bit_num .gt. 0) then
  322. X`09      call test_bit (%val(bitmap_base_addr), bit_num, status)
  323. X`09      if (status .eq. ss$_wasset) then
  324. X`09         num_bits_set = num_bits_set + 1
  325. Xd`09         write (66,*) 'bit ',bit_num,' was already set : ',servers(bit_n
  326. Vum)
  327. X`09      endif
  328. X`09   endif
  329. X`09enddo
  330. X
  331. X
  332. X`09num_scroll_Lines = 5
  333. Xc
  334. Xc ---`09Set up the scrolling region
  335. Xc
  336. X`09rows = num_bits_set + num_scroll_lines - 1
  337. X`09cols = 52
  338. X`09call SMG$CREATE_VIRTUAL_DISPLAY (rows, cols, scroll_ID, SMG$M_BORDER)
  339. X`09call SMG$LABEL_BORDER (scroll_ID, ' Ports Summary ')
  340. X`09call SMG$CREATE_VIEWPORT (scroll_ID, 1, 1, num_scroll_lines, 50)
  341. X`09mask = 0
  342. X`09mask = SMG$M_SCROLL_SMOOTH + SMG$M_CURSOR_OFF
  343. X`09call SMG$SET_CURSOR_MODE (paste_ID, mask)
  344. X`09call SMG$HOME_CURSOR (scroll_ID, SMG$C_UPPER_LEFT)
  345. X`09modifiers = 0
  346. X`09modifiers = TRM$M_TM_ESCAPE .or. TRM$M_TM_NOECHO .or.`09
  347. X`091           TRM$M_TM_PURGE
  348. X
  349. X`09irow = 1
  350. X`09bit_num = 0
  351. X`09num_Longwords = (8 * 24) / 32
  352. X`09max_buffer_size = 50
  353. X
  354. X`09do bit_num = 1, num_longwords*32
  355. X`09   if (bit_num .gt. 0) then
  356. X`09      call test_bit (%val(bitmap_base_addr), bit_num, status)
  357. X`09      if (status .eq. ss$_wasset) then
  358. X`09         call REPEAT (out_str, ' ')
  359. X`09         out_str = servers(bit_num)
  360. X`09         call CENTER_STRING (out_str, max_buffer_size, status)
  361. X`09         call SMG$PUT_CHARS (scroll_ID, out_str, irow, 3, zero, ,,0)
  362. X`09         irow = irow + 1
  363. X`09      endif
  364. X`09   endif
  365. X`09enddo
  366. X
  367. X
  368. X700`09continue
  369. X`09max_chars = 6
  370. X`09call SMG$PASTE_VIRTUAL_DISPLAY (scroll_ID, paste_ID, 13, 20)
  371. X`09status = SMG$READ_STRING (kybd_ID, in_string, , max_chars, modifiers,,,,
  372. X`091                         terminator)
  373. X
  374. X`09irow = num_scroll_lines
  375. X`09current_Line     = 1
  376. X
  377. X`09do while ((status) .and. (terminator .ne. SMG$K_TRM_CR) .and.
  378. X`091                        (terminator .ne. SMG$K_TRM_ENTER) .and.
  379. X`092                        (terminator .ne. SMG$K_TRM_CTRLZ))
  380. X`09   if (.not. status) call LIB$SIGNAL (%val(status))
  381. X
  382. X`09   if ((terminator .eq. SMG$K_TRM_KP8) .or.
  383. X`091      (terminator .eq. SMG$K_TRM_UP)  .or.
  384. X`092      (terminator .eq. SMG$K_TRM_NEXT_SCREEN)) then
  385. X`09      num = current_line + num_scroll_lines
  386. X`09      if (num .gt. num_bits_set) then
  387. X`09         num = num_bits_set - current_line
  388. X`09         current_line = num_bits_set
  389. X`09      else
  390. X`09         current_line = num
  391. X`09         num = num_scroll_lines
  392. X`09      endif
  393. X
  394. X`09      do i = 1, num
  395. X`09         call SMG$SCROLL_VIEWPORT (scroll_ID, SMG$M_UP, 1)
  396. X`09      enddo
  397. X
  398. X`09   elseif ((terminator .eq. SMG$K_TRM_KP2) .or.
  399. X`091          (terminator .eq. SMG$K_TRM_DOWN)  .or.
  400. X`092          (terminator .eq. SMG$K_TRM_PREV_SCREEN)) then
  401. X`09      num = current_line - num_scroll_lines
  402. X`09      if (num .lt. 1) then
  403. X`09         num = current_line - 1
  404. X`09         current_line = 1
  405. X`09      else
  406. X`09         current_line = num
  407. X`09         num = num_scroll_lines
  408. X`09      endif
  409. X
  410. X`09      do i = 1, num
  411. X`09         call SMG$SCROLL_VIEWPORT (scroll_ID, SMG$M_DOWN, 1)
  412. X`09      enddo
  413. X
  414. X           elseif (terminator.eq.smg$k_trm_ctrlw) then
  415. X              call smg$repaint_screen ( paste_ID )
  416. X
  417. X           elseif ((terminator.eq.smg$k_trm_ctrlz) .or.
  418. X`091          (terminator .eq. SMG$K_TRM_CR)) then
  419. X`09     goto 1000
  420. X
  421. X`09   endif
  422. X
  423. X`09   status = SMG$READ_STRING (kybd_ID, in_string,, max_chars,
  424. X`091                            modifiers,,,, terminator)
  425. X`09enddo
  426. X
  427. X1000`09mask = 0
  428. X
  429. X
  430. X`09mask = SMG$M_SCROLL_JUMP + SMG$M_CURSOR_ON
  431. X`09call SMG$DELETE_VIRTUAL_DISPLAY (scroll_ID)
  432. X`09call SMG$SET_CURSOR_MODE (paste_ID, mask)
  433. X`09call SMG$UNPASTE_VIRTUAL_DISPLAY (scroll_id, paste_id)
  434. X
  435. X
  436. X
  437. X
  438. X`09return
  439. X`09end
  440. X
  441. X
  442. X
  443. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  444. Vcccc
  445. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  446. Vcccc
  447. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  448. Vcccc
  449. X
  450. X
  451. X
  452. $ CALL UNPACK PROFILE.FOR;130 1681590626
  453. $ create 'f'
  454. XC************************************************************************
  455. XC Common definitions for UAF
  456. XC************************************************************************
  457. X
  458. Xd`09integer*4    uai$v_Restricted  `20
  459. Xd`09parameter    (uai$v_Restricted = 16 )
  460. Xd
  461. Xd`09integer*4    uai$v_Disforce_pwd_change
  462. Xd`09parameter    (uai$v_Disforce_pwd_change = 15 )
  463. X
  464. X`09Character*32 account
  465. X`09Character*23 exprdate, pwd_lifetime, password_change_date
  466. X`09Character*20 u, orig_uname
  467. X`09Character*15 uic
  468. X`09Character*12 username, password
  469. X`09Character*10 cpu_string
  470. X        Character*6  maxjobs_string, fillm_string, bytlm_string,
  471. X     .`09`09     maxacctjobs_string, shrfillm_string,
  472. X     .`09`09     pbytlm_string, maxdetach_string, biolm_string,
  473. X     .`09`09     jtquota_string, prclm_string, diolm_string,
  474. X     .`09`09     wsdef_string, prio_string, astlm_string,
  475. X     .`09`09     wsquo_string, queprio_string, tqelm_string,
  476. X     .`09`09     wsextent_string, enqlm_string, pgflquo_string,
  477. X     .`09`09     pwd_length_string
  478. X`09Character*23 char_last_login_i, char_last_login_n
  479. X`09Integer*4    smg$read_string, smg$create_virtual_keyboard,
  480. X     .`09`09     smg$create_pasteboard, smg$paste_virtual_display,
  481. X     .`09`09     smg$create_virtual_display, smg$set_cursor_abs,
  482. X     .`09`09     smg$begin_pasteboard_update, smg$put_chars_wide,
  483. X     .`09`09     smg$end_pasteboard_update, smg$put_chars,`20
  484. X     .`09`09     smg$change_rendition, smg$erase_display,
  485. X     .               smg$create_viewport, smg$label_border,
  486. X     .               smg$set_cursor_mode, smg$scroll_viewport,
  487. X     .               smg$home_cursor,
  488. X     .`09`09     ots$cvt_l_ti, ots$cvt_ti_l, ots$cvt_to_l,`20
  489. X     .`09`09     sys$asctim, sys$bintim, sys$getuai, sys$setprv,`20
  490. X     .`09`09     sys$setuai, sys$assign, sys$qiow,`20
  491. X     .               lib$disable_ctrl, lib$enable_Ctrl, lib$create_dir,`20
  492. X     .               lib$getdvi,
  493. X     .`09`09     lib$bbssi, lib$bbcci, lib$get_foreign,
  494. X     .`09`09     lib$sys_fao, lib$getjpi, lib$find_file
  495. X`09Integer*4    flags, bytlm, prime, jtquota, prio, queprio,
  496. X     .`09`09     cpu, end_list, days, hours, minutes,`20
  497. X     .`09`09     seconds, astlm, biolm, wsdef, diolm, enqlm,`20
  498. X     . `09`09     maxacctjobs, maxdetach, maxjobs, pbytlm, fillm,
  499. X     .`09`09     mem, grp, pgflquo, prclm, shrfillm, tqelm,
  500. X     .`09`09     wsextent, wsquo, batch_p, batch_s, dialup_p,`20
  501. X     .`09`09     dialup_s, local_p, local_s, network_p, network_s,`20
  502. X     .`09`09     remote_p, remote_s, uic_value
  503. X       `09Integer*4    keyboard, main, message, priv_board, flags_board,
  504. X     .`09`09     access_board, days_board, pasteboard, instruct,
  505. X     .`09`09     error_message, term, login_board
  506. X`09Integer*4    account_len, defdev_len, defdir_len,
  507. X     .`09`09     owner_len, username_len, password_len, uname_len,
  508. X     .`09`09     tables_len, lgicmd_len, defcli_len, lastlogi, lastlogn,
  509. X     .               change_date_len
  510. X        Integer*4    mem_len, grp_len, pwd_life_len, auth_priv_len,`20
  511. X     .`09`09     prime_len, def_priv_len, flags_len, pwd_length,`20
  512. +-+-+-+-+-+-+-+-  END  OF PART 17 +-+-+-+-+-+-+-+-
  513. -- 
  514. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  515. < Joe Koffley                        KOFFLEY@NRLVAX.NRL.NAVY.MIL             >
  516. < Naval Research Laboratory          KOFFLEY@CCF.NRL.NAVY.MIL                >
  517. < Space Systems Division             AT&T  :  202-767-0894                   >
  518. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  519.