commit cabcac9cc09199082f565952bcbb14de75c07acf
parent 7fba43aa92fe2ce395cb3f26cb3bd22cc78a17ea
Author: sin <sin@2f30.org>
Date: Fri, 8 Apr 2016 10:07:52 +0100
style fix
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/stun.c b/stun.c
@@ -244,9 +244,9 @@ revokeprivs(void)
pw = getpwnam(NOPRIVUSER);
if (!pw)
logerr("no %s user", NOPRIVUSER);
- if (setgroups(1, &pw->pw_gid) ||
- setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||
- setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
+ if (setgroups(1, &pw->pw_gid) < 0 ||
+ setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0 ||
+ setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0)
logerr("failed to revoke privs");
}