opendoas

A portable version of the OpenBSD `doas` command
git clone https://pi.duncano.de/git/opendoas.git
Log | Files | Refs | README | LICENSE

commit e4bf599cc2019f436f6251b6dbd8aac2876f20b8
parent e60457f5429605e5200c121bbc5ac1cac30c3712
Author: Duncaen <mail@duncano.de>
Date:   Thu,  2 Jun 2016 16:29:01 +0200

check return value of setresuid

Diffstat:
doas.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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);