home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sun / admin / 8547 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  1.2 KB

  1. Xref: sparky comp.sys.sun.admin:8547 comp.unix.admin:6315 comp.unix.programmer:5388 comp.unix.wizards:4829
  2. 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
  3. From: usmyrtle@mcs.drexel.edu (Steven Myrtle)
  4. Newsgroups: comp.sys.sun.admin,comp.unix.admin,comp.unix.programmer,comp.unix.wizards
  5. Subject: restricting execution to console only
  6. Message-ID: <1992Nov21.205435.9695@mcs.drexel.edu>
  7. Date: 21 Nov 92 20:54:35 GMT
  8. Sender: usmyrtle@mcs.drexel.edu (Steven Myrtle)
  9. Organization: Drexel University
  10. Lines: 13
  11.  
  12. Is there a guaranteed way of restricting the execution of a program to the
  13. console only under SunOS 4.1.x?  I've tried using ttyname(0) and checking
  14. that it returns "/dev/console", but that can be fooled if the owner of the
  15. console runs the executable as "a.out < /dev/console" from another window.
  16.  
  17. I've also thought about using ttyslot() to get the relevant entry in the
  18. utmp file and then checking ut_line, but my utmp files need to be world
  19. writable, and anyone could edit the file and change the terminal name.
  20.  
  21. Please email me if possible.
  22.  
  23. Thanks,
  24. Steven (usmyrtle@mcs.drexel.edu)
  25.