aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2016-06-02 16:29:01 +0200
committerDuncaen <mail@duncano.de>2016-06-02 16:29:01 +0200
commite4bf599cc2019f436f6251b6dbd8aac2876f20b8 (patch)
treef65216c164a5d35b2a16fc2ee9c9d7be5ae2ad11
parente60457f5429605e5200c121bbc5ac1cac30c3712 (diff)
downloadopendoas-e4bf599cc2019f436f6251b6dbd8aac2876f20b8.tar.gz
check return value of setresuid
-rw-r--r--doas.c4
1 files changed, 3 insertions, 1 deletions
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);