diff options
author | Russ Allbery <rra@stanford.edu> | 2012-02-18 18:40:53 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2012-02-18 18:40:53 -0800 |
commit | e45a864168d3ac67dfc31399cc67a86e0e802ea7 (patch) | |
tree | abd97ad3f7db34c3d5583153cc6b3f2cc902e3da /server | |
parent | f7a051250bac985d971c14305544ec091bd016e6 (diff) |
Only impose a network timeout on the server, not a session limit
The remctld server now imposes a one-hour timeout between messages
from the client rather than a one-hour timeout for the entire session,
allowing clients to continue to send commands for as long as they stay
connected and not idle.
Change-Id: I8c332e34a9561dace06a2b23274ebdafc2ab8bcd
Diffstat (limited to 'server')
-rw-r--r-- | server/remctld.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/server/remctld.c b/server/remctld.c index f6b24ce..f88f0ee 100644 --- a/server/remctld.c +++ b/server/remctld.c @@ -7,7 +7,7 @@ * * Written by Anton Ushakov * Extensive modifications by Russ Allbery <rra@stanford.edu> - * Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 + * Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012 * The Board of Trustees of the Leland Stanford Junior University * * See LICENSE for licensing terms. @@ -277,9 +277,6 @@ server_daemon(struct options *options, struct config *config, socklen_t sslen; char ip[INET6_ADDRSTRLEN]; - /* We're running as a daemon, so don't self-destruct. */ - alarm(0); - /* Set up a SIGCHLD handler so that we know when to reap children. */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = child_handler; @@ -404,12 +401,6 @@ main(int argc, char *argv[]) OM_uint32 minor; struct config *config; - /* - * Since we are normally called from tcpserver or inetd, prevent clients - * from holding on to us forever by dying after an hour. - */ - alarm(60 * 60); - /* Ignore SIGPIPE errors from our children. */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; |