home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!Nephi.Enet.DEC.Com!coar
- From: coar@Nephi.Enet.DEC.Com (Rodent of Unusual Size)
- Newsgroups: comp.os.vms
- Subject: Re: Am I in SYLOGIN?
- Summary: I use a bit in SITESPEC
- Keywords: one-time application, SYLOGIN, CTL$GL_SITESPEC
- Message-ID: <1992Jul22.181952.6698@nntpd.lkg.dec.com>
- Date: 22 Jul 92 19:00:31 GMT
- Sender: usenet@nntpd.lkg.dec.com (USENET News System)
- Distribution: comp
- Organization: Digital Equipment Corp.
- Lines: 58
- Organisation: Employed by (*NOT* speaker for) DEC, Boxborough, MA, U.S.A.
-
-
- In article <1992Jul22.113259.1@utxvms.cc.utexas.edu>, ccdk001@utxvms.cc.utexas.edu writes...
- >
- >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.
-
- Well, this won't *quite* answer the question as asked, but.. how about a
- method for a programme that only does its thing once, regardless of how
- many times it's executed?
-
- I have a programme that is run twice during SYLOGIN on my systems. Its
- basic task is to boost the current priority (so the SYLOGIN runs quickly),
- create a default diskquota and directory for the user, if necessary. The
- second and all subsequent times it is run, it merely sets the priority
- back down to what it was at the first invocation.
-
- In a nutshell, it does a BBSS on an arbitrary bit in the CTL$GL_SITESPEC
- longword. The assumption made is that this cell is guaranteed zero on
- process startup; this is a relatively safe assumption, though I'm not sure
- it's documented.
-
- Details:
-
- In technical terms, it fetches the contents of cell CTL$GL_SITESPEC, and
- checks a particular bit in it. Then,
-
- o If is CLEAR, the programm:
- - calls $GETJPI is called to get the current base priority
- - calls $CMKRNL, and the kernel-mode routine
- . saves the previous priority in a kernel-mode logical name in the
- LNM$JOB table
- . sets the bit in CTL$GL_SITESPEC
- - exits from kernel mode, and uses $SETPRI to boost the priority
- - creates the diskquota and SYS$LOGIN directory if necessary
- - exits
-
- o If the bit is SET, the programm:
- - translates the logical name mentioned above. If it is not defined
- in kernel mode, it is ignored, and the programme exits. If it IS
- defined in kernel mode, the equivalence name is fed to $SETPRI
- - exits
-
- To do all its work, the programme needs to be installed with
- (CMKRNL,ALTPRI,SYSPRV). Subsets disable the related functionality
- silently.
-
- >David Barkelew Internet: barkelew@utxvms.cc.utexas.edu
-
- #ken :-)} Jeratol the Chaotic
-
- Coar@Nephi.Enet.DEC.Com | All opinions herein contained, stated or implied,
- Coar@DECUS.Org | are solely those of the author. And he's fullovem.
- Coar@Eisner.DECUS.Org | `... it was mine art, ... that made gape the pine
- Massachusetts, USA | and let thee out.' - Prospero (_The Tempest_)
-