[aklug] Re: terminal types and curses programming

From: Arthur Corliss <acorliss@nevaeh-linux.org>
Date: Wed Jan 28 2009 - 08:24:43 AKST

On Mon, 26 Jan 2009, Christopher Howard wrote:

> I'm going to sound like a real noob here, but can you explain a bit more
> about the 'trap' and 'exit' part? Is this something I'm supposed to add to
> some init script or something? (I'll read the man pages if you'll point me to
> the right ones.)

It's worth mentioning for the more paranoid out there: if you want to
control your user's environment (*especially* if you're using the rc file to
selectively enable a restricted shell) you should wrap all of /etc/profile's
code between two trap calls (one to disable the default signal handlers, and
one to re-enable them once you're finished with your initialization).

Sounds like a good poll for everyone here: can everyone check your distro's
/etc/profile and report if they use trap as the first & last commands? It'd
be good to see what the relative paranoia of the various distros are.
Report back to the list!

         --Arthur Corliss
           Live Free or Die
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Jan 28 08:24:54 2009

This archive was generated by hypermail 2.1.8 : Wed Jan 28 2009 - 08:24:54 AKST