home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!agate!dog.ee.lbl.gov!ucbvax!lrw.com!leichter
- From: leichter@lrw.com (JERRY LEICHTER)
- Newsgroups: comp.os.vms
- Subject: re: Am I in SYLOGIN?
- Message-ID: <9207230644.AA27797@uu3.psi.com>
- Date: 23 Jul 92 02:05:48 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 47
-
-
- 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.
-
- There's really no way to get the effect you are SPECIFYING in any useful
- way. After all, nothing prevents the user from executing SYLOGIN.COM again
- himself!
-
- However, if you change the statement of the problem to "execute only once in
- a process", there are several possible solutions. Looked at this way, all
- you need is some unremoveable "tag" set on the process that the program can
- check to see if it's run before. An identifier granted to the process would
- do the trick. So would an exec-mode logical name defined in the process
- table. Even the image count is an example of this technique, though it's
- one that may be difficult to control.
-
- Of course, this prevents a user from running it AGAIN. Ensuring that it runs
- only in a controlled environment just means that you have to be sure that it
- runs once in SYLOGIN.COM, which means your SYLOGIN.COM has to be uninterrupt-
- able until the program has run. That's no big deal to accomplish....
-
- There's a related problem: What happens if the user creates a subprocess?
- It won't execute normally SYLOGIN.COM, and it won't run your program. What
- should the security policy in that case be? Is it OK that the program hasn't
- run? Should it be allowed to run? If not, it's easy to prevent it - one
- simple way is to use the exec-mode logical as before, but place it in the
- job table.
-
- However, the best alternative is to make the privileged application foolproof.
- Otherwise, you'll have to worry about oddball cases. For example, what if
- someone uses $CREPRC to start a detached process running the application?
-
- -- Jerry
-
-