home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / vms / 12837 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  2.6 KB

  1. Path: sparky!uunet!usc!sol.ctr.columbia.edu!eff!news.byu.edu!yvax.byu.edu!heinrich
  2. From: heinrich@yvax.byu.edu
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Am I in SYLOGIN?
  5. Message-ID: <1992Jul27.225303.848@yvax.byu.edu>
  6. Date: 27 Jul 92 22:53:03 -0700
  7. References: <1992Jul22.113259.1@utxvms.cc.utexas.edu>
  8. Organization: Brigham Young University
  9. Lines: 46
  10.  
  11. In article <1992Jul22.113259.1@utxvms.cc.utexas.edu>, ccdk001@utxvms.cc.utexas.edu writes:
  12. > Anyone know of a simple, fairly fullproof way to determine if an image
  13. > is being run from SYLOGIN.COM or some other known place (step) during
  14. > process creation?
  15. > I have an installed privileged application that I want executed during the
  16. > login process, but I don't want users to be able to execute it directly.
  17. > It does "things" based on an assumed state of that process/environment at
  18. > that time particular time.  Allowing users to change their environment
  19. > (logical names, devices, etc.) and then rerunning this image could be
  20. > a problem in some instances.
  21. > Grabing the procedure depth/name from the clidata doesn't seem fullproof
  22. > enough.   Checking the imagecount in the process header could work, but
  23. > I dunno..  Patching loginout (again!) is also too messy.    I'd appreciate
  24. > any ideas/strategies.
  25. > Thanks,
  26. > ++ Dave
  27. > -----------------------------------------------------------------------
  28. > David Barkelew                  Internet: barkelew@utxvms.cc.utexas.edu
  29. > Unix/VMS Services,              UUCP:     ...!ut-emx!utxvms!barkelew
  30. > Computation Center              THEnet:   UTXVMS::BARKELEW
  31. > University of Texas             BITNET:   BARKELEW@UTXVMS
  32. > Voice: (512)471-3241            FAX:      (512)471-1582
  33. > -----------------------------------------------------------------------
  34.  
  35.  
  36. One little trick you could use, assuming no one else in your organization 
  37. or third party software uses it, is to use the longword in P1 space,
  38. CTL$GL_SITESPEC and load a value in there after the initialization is
  39. complete.  CTL$GL_SITESPEC is an "available for customers" longword that
  40. VMS creates in every process.  The first time your code executes, assuming
  41. it has KERNEL WRITE access, it checks this longword.  If it is zero, the
  42. default, then it writes a value to it.  Subsequent executions of the 
  43. program will fail, since the value is no longer 0.  This longword is
  44. kernel read/executive read, if memory serves me.  (Too tired to open
  45. the IDSM now... sorry).
  46.  
  47. *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  48. Ed Heinrich
  49. The LOKI Group, Inc.
  50. HEINRICH@yvax.byu.EDU
  51. *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  52.  
  53.