summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-06-20 20:56:10 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-06-20 20:56:10 +0000
commit70e85c3c58e8720f3a0fdb0240b475338652cdcd (patch)
tree0595f02ac92e5300e49cf77bf12510a9024a9f49
parentbcb351e66b6f5593507b3cad84ef888f49efdffc (diff)
downloadutmps-70e85c3c58e8720f3a0fdb0240b475338652cdcd.tar.xz
Increase timeouts to 30s - do not penalize slow clients
-rw-r--r--src/utmps/utmps-utmpd.c4
-rw-r--r--src/utmps/utmps-wtmpd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utmps/utmps-utmpd.c b/src/utmps/utmps-utmpd.c
index b098b79..d8183ae 100644
--- a/src/utmps/utmps-utmpd.c
+++ b/src/utmps/utmps-utmpd.c
@@ -22,7 +22,7 @@ static int fd = -1 ;
static void get0 (char *s, size_t n)
{
tain_t deadline ;
- tain_ulong(&deadline, 2) ;
+ tain_ulong(&deadline, 30) ;
tain_add_g(&deadline, &deadline) ;
if (buffer_timed_get_g(buffer_0small, s, n, &deadline) < n)
strerr_diefu1sys(111, "read from stdin") ;
@@ -31,7 +31,7 @@ static void get0 (char *s, size_t n)
static void flush1 (void)
{
tain_t deadline ;
- tain_ulong(&deadline, 2) ;
+ tain_ulong(&deadline, 30) ;
tain_add_g(&deadline, &deadline) ;
if (!buffer_timed_flush_g(buffer_1small, &deadline))
strerr_diefu1sys(111, "write to stdout") ;
diff --git a/src/utmps/utmps-wtmpd.c b/src/utmps/utmps-wtmpd.c
index 3571658..c38168a 100644
--- a/src/utmps/utmps-wtmpd.c
+++ b/src/utmps/utmps-wtmpd.c
@@ -39,7 +39,7 @@ int main (void)
if (!uid0_scan(x, &uid)) strerr_dieinvalid(100, "IPCREMOTEEUID") ;
if (ndelay_on(0) < 0) strerr_diefu1sys(111, "set stdin non-blocking") ;
tain_now_g() ;
- tain_ulong(&deadline, 2) ;
+ tain_ulong(&deadline, 30) ;
tain_add_g(&deadline, &deadline) ;
w = buffer_timed_get_g(buffer_0small, buf, 1, &deadline) ;