home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.sun.admin:8547 comp.unix.admin:6315 comp.unix.programmer:5388 comp.unix.wizards:4829
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!netnews.upenn.edu!netnews.noc.drexel.edu!king.mcs.drexel.edu!king.mcs.drexel.edu!usmyrtle
- From: usmyrtle@mcs.drexel.edu (Steven Myrtle)
- Newsgroups: comp.sys.sun.admin,comp.unix.admin,comp.unix.programmer,comp.unix.wizards
- Subject: restricting execution to console only
- Message-ID: <1992Nov21.205435.9695@mcs.drexel.edu>
- Date: 21 Nov 92 20:54:35 GMT
- Sender: usmyrtle@mcs.drexel.edu (Steven Myrtle)
- Organization: Drexel University
- Lines: 13
-
- Is there a guaranteed way of restricting the execution of a program to the
- console only under SunOS 4.1.x? I've tried using ttyname(0) and checking
- that it returns "/dev/console", but that can be fooled if the owner of the
- console runs the executable as "a.out < /dev/console" from another window.
-
- I've also thought about using ttyslot() to get the relevant entry in the
- utmp file and then checking ut_line, but my utmp files need to be world
- writable, and anyone could edit the file and change the terminal name.
-
- Please email me if possible.
-
- Thanks,
- Steven (usmyrtle@mcs.drexel.edu)
-