1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Handle return value of nice(3) properly

Fixes #27
This commit is contained in:
James Hunt 2016-07-15 09:28:57 -04:00 committed by Nicolas Viennot
parent 090c2b04a6
commit 76ec591e91

View File

@ -393,8 +393,7 @@ static void jail(void)
tmate_fatal("Cannot setuid()"); tmate_fatal("Cannot setuid()");
#endif #endif
if (nice(1) < 0) nice(1);
tmate_fatal("Cannot nice()");
tmate_info("Dropped priviledges to %s (%d,%d), jailed in %s", tmate_info("Dropped priviledges to %s (%d,%d), jailed in %s",
TMATE_JAIL_USER, uid, gid, TMATE_WORKDIR "/jail"); TMATE_JAIL_USER, uid, gid, TMATE_WORKDIR "/jail");