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