Aharpo.539 net.bugs.4bsd utzoo!decvax!harpo!alb Sat Apr 24 10:55:54 1982 lock bugs and fixes The program lock should disallow locking up a terminal owned by root, since someone can come along with the master key, unlock the terminal, and play around to his/her heart's content. The fix is very simple: Before it goes through the for loop for ignoring signals, add the lines: if (getuid() == 0) { fprintf(stderr, "you have too many privileges to be locked.\n"); exit(0); } [Some systems also have special groups of people in /etc/group that can automatically become root in some way or another. For these systems, I have prepared routines that check the real user (as found in utmp) and then check to see is he/she is in that group. If he/she is, it won't lock up either. Any who wants these should mail me (I'm not posting them since not everyone needs them.)] Another problem I found was that with the new tty driver, ^Z effectively unlocks the terminal, since it puts lock into the background. Again, the fix is simple. Change the line reading: for (t = 1; t <= <="18;" SEE FOR ANYONE T ANYTHING T++) WITH DOES
This Usenet Oldnews Archive article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.
2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright© 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.


Goto NEXT article in NET.bugs.4bsd Newsgroup
Return to NET.bugs.4bsd index
Return to the Usenet Oldnews Archive index ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.