From: Duncaen Date: Thu, 2 Jun 2016 14:29:01 +0000 (+0200) Subject: check return value of setresuid X-Git-Tag: v0.2~5 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=e4bf599cc2019f436f6251b6dbd8aac2876f20b8 check return value of setresuid --- diff --git a/doas.c b/doas.c index 6f644ec..3e15824 100644 --- a/doas.c +++ b/doas.c @@ -295,7 +295,9 @@ checkconfig(const char *confpath, int argc, char **argv, { struct rule *rule; - setresuid(uid, uid, uid); + if (setresuid(uid, uid, uid) != 0) + err(1, "setresuid"); + parseconfig(confpath, 0); if (!argc) exit(0);