[ltp] lock terminals by bringing the lap into sleep mode

Benjamin Weste Pearre linux-thinkpad@linux-thinkpad.org
Thu, 4 Mar 2004 15:02:12 -0700


Ok, so last night I played with that script and found that it doesn't
complete.  This explains why the laptop takes 30 seconds to go to
sleep (apmd_proxy never finishes, and apmd times it out in 30
seconds), and why the xlock doesn't even _activate_ until about a
second after the machine wakes up!!

Here's a security hole for ye.  Given a sleeping machine: open the
lid.  You now have about 1 second to find an xerm and type "killall
xscreensaver" or "xscreensaver-command -kill" or what-have-you.  Of
course, next time you close the lid xscreensaver is already running,
so you have to be a fast typist since you only get the one chance.

All this leads to the question "why doesn't xscreensaver-command -lock
actually lock the display on sleep?".  I don't know.  My script begins
to execute on suspend, but never finishes.  Locking on wake-up,
however, works fine.  Indeed, "/etc/apm/apmd_proxy suspend user" locks
the screen perfectly.  So: dunno, but don't use my script until you
understand just how bad it really is.

Cheers!
-Ben

-- 
Ben Pearre          http://hebb.mit.edu/~ben       PGP: CFDA6CDA
Don't let Bush read your email!             http://www.gnupg.org