On Tuesday 01 February 2011 19:09, Cathey, Jim wrote:
> >I notice that getty has a timeout - does this take care of inactivity
> >in the shell?
> 
> No.
> 
> >And I also noticed that ash has no timeouts in the source at all.
> 
> Completely normal.
> 
> >I can code an idle timeout into ash, but I wanted to check...
> 
> Please don't.
> 
> Idle timeouts are always implemented outside the shell.
> Otherwise, consider how one can circumvent them by typing
> something highly secret, like "ed".  (Pick your favorite
> interactive tool here.)
> 
> The idle timeout program (and I forget the name of the common
> one) just watches the TTY accessed times, and if they stop moving
> they kill the session.

$ busybox timeout --help
BusyBox v1.19.0.git (2011-01-31 05:53:40 CET) multi-call binary.

Usage: timeout [-t SECS] [-s SIG] PROG ARGS

Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Defaults: SECS: 10, SIG: TERM.


But beware that all such tools can be easily fooled
by creating new program groups and/or sessions.
They are generally no good for security purposes.
You need to use "stronger" containers.

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to