logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 1a213cc952ffd22b6261c2d55c80d9cd12a2b2eb
parent 7286f7e8e72e16819e1f4fb1f885abed7831ed85
Author: Michael Forney <mforney@mforney.org>
Date:   Mon,  5 Apr 2021 19:56:18 -0700

openbsd: doas: Use == -1 for error checking for consistency

Diffstat:

Mpkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch10+++++-----
Mpkg/openbsd/ver2+-
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch b/pkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch @@ -1,4 +1,4 @@ -From 6d212c71ee3f1a2068793cc416afbeabc0002184 Mon Sep 17 00:00:00 2001 +From 9e07250958968c674c1b1041d8b2887c9e1edfc3 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 26 Feb 2017 16:50:55 -0800 Subject: [PATCH] doas: Port to linux/musl @@ -63,7 +63,7 @@ index fc769bdb336..c7196e347a9 100644 Parse and check the configuration file .Ar config , diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c -index a723c67a3eb..857c8202c39 100644 +index a723c67a3eb..8b0c2931f92 100644 --- a/usr.bin/doas/doas.c +++ b/usr.bin/doas/doas.c @@ -20,8 +20,6 @@ @@ -308,11 +308,11 @@ index a723c67a3eb..857c8202c39 100644 - LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK | - LOGIN_SETUSER) != 0) - errx(1, "failed to set user context for target"); -+ if (initgroups(targpw->pw_name, targpw->pw_gid) < 0) ++ if (initgroups(targpw->pw_name, targpw->pw_gid) == -1) + err(1, "initgroups"); -+ if (setgid(targpw->pw_gid) < 0) ++ if (setgid(targpw->pw_gid) == -1) + err(1, "setgid"); -+ if (setuid(targpw->pw_uid) < 0) ++ if (setuid(targpw->pw_uid) == -1) + err(1, "setuid"); if (pledge("stdio rpath exec", NULL) == -1) diff --git a/pkg/openbsd/ver b/pkg/openbsd/ver @@ -1 +1 @@ -6.8 r1 +6.8 r2