From 76ec591e91731f49d1b1f4d3339d73b95d13e11b Mon Sep 17 00:00:00 2001 From: James Hunt Date: Fri, 15 Jul 2016 09:28:57 -0400 Subject: [PATCH] Handle return value of nice(3) properly Fixes #27 --- tmate-slave.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmate-slave.c b/tmate-slave.c index 6f1b2e72..51fcdb21 100644 --- a/tmate-slave.c +++ b/tmate-slave.c @@ -393,8 +393,7 @@ static void jail(void) tmate_fatal("Cannot setuid()"); #endif - if (nice(1) < 0) - tmate_fatal("Cannot nice()"); + nice(1); tmate_info("Dropped priviledges to %s (%d,%d), jailed in %s", TMATE_JAIL_USER, uid, gid, TMATE_WORKDIR "/jail");