home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / vmsnet / internal / 1310 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  3.5 KB

  1. Path: sparky!uunet!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32
  2. From: "GWDGV1::MOELLER" <moeller@gwdgv1.dnet.gwdg.de>
  3. Newsgroups: vmsnet.internals
  4. Subject: RE: Help patching MAILSHR
  5. Message-ID: <8170341@MVB.SAIC.COM>
  6. Date: Mon, 14 Sep 1992 13:47:02 +0200
  7. Organization: Macro32<==>Vmsnet.Internals Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 61
  10.  
  11. Dale Miller <domiller@ualr.edu> writes:
  12. > I have been trying to modify the mailshr patch posted Claude Barbe to verify
  13. > if a user exists in the local sysuaf, and transparently re-write the address
  14. > if not.  I can get the code to work fine in Macro using a call to sys$getuai,
  15. > but I can't figure out how to get it into a patch.  Apparently sys$getuai does
  16. > not translate to an address that can be used by patch (unlike sys$setprv or
  17. > sys$fao which are also used in the patch).
  18. >
  19. > Okay, now the question.  How can I accomplish finding the validity of a user
  20. > in a manner that can be used in a patch to mailshr?
  21.  
  22. SYS$GETUAI lives in a privileged shareable image (SECURESHR),
  23. so LIB$FIND_IMAGE_SYMBOL would be required to dynamically access it
  24. (unless MAILSHR was already linked with SECURESHR, which it isn't).
  25.  
  26. What I've done once (and even put into production use):
  27. You can provide a shareable image of your own, which does the required
  28. function (and could be linked with whatever additional images you'd like).
  29. Since apart from entry point lookup, the code for activating a shareable image
  30. is in the (undocumented, but resident) SYS$IMGACT system service,
  31. that image and all of its additional libraries can be dynamically activated,
  32. and in order to call it you just have to arrange for a fixed entry point
  33. address (e.g. 0). You may wish to make sure that you don't activate
  34. the image more than once - I'm not sure if that is required because
  35. my patch affected code usually executed only once.
  36.  
  37. In essence, the patch then goes:
  38.  
  39. { deposit *full* filespec of your shareable image at MY_IMGNAM }
  40. { MY_IMGNAM_LEN = length of that filespec }
  41.  
  42. { make sure R0 and R1 can be destroyed }
  43. '       movl    r2,-(sp)'               ! save r2
  44. '       subl2   #210,sp'                ! room for imgact data
  45. '       movl    sp,r2'                  !       +0: image desc
  46. '       clrq    b^8(r2)'                !       +8: inadr/retadr
  47. '       movab   l^MY_IMGNAM,b^4(r2)'    !       +10: hdrbuf
  48. '       movl    #MY_IMGNAM_LEN,(r2)'    ! len of image name
  49. '       pushl   #0'                     ! $IMGACT_S _
  50. '       pushl   #0'                     !       _
  51. '       pushaq  b^8(r2)'                !       retadr=8(r2),_
  52. '       pushaq  b^8(r2)'                !       inadr=8(r2),_
  53. '       pushl   #30'                    !     imgctl=#iac$m_expreg!iac$m_merge,_
  54. '       pushab  b^10(r2)'               !       hdrbuf=x^10(r2),_
  55. '       pushl   #0'                     !       _
  56. '       pushaq  (r2)'                   !       name=(r2)
  57. '       calls   #8,@#7FFEDF90'          !
  58. '       blbc    r0,my_error'            !
  59. '       calls   #0,@#7FFEE400'          ! $IMGFIX_S
  60. '       blbc    r0,my_error'            !
  61. '       movl    b^8(r2),r1'             ! save base adress in R1
  62. 'my_error: addl2        #210,sp'        ! cleanup
  63. '       movl    (sp)+,r2'               ! restore r2
  64. { activation status is in R0 }
  65. { if o.k., R1 points to the start of the image }
  66.  
  67. This patch has worked for me unchanged since VMS V4.x
  68.  
  69. Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ...
  70. PSI%(0262)45050352008::MOELLER      Phone: +49 551 201516 | No claim intended!
  71. Internet: moeller@gwdgv1.dnet.gwdg.de   | This space intentionally left blank.
  72.