diff options
| author | Michael Forney <mforney@mforney.org> | 2021-04-05 19:56:18 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2021-04-05 20:09:05 -0700 |
| commit | 1a213cc952ffd22b6261c2d55c80d9cd12a2b2eb (patch) | |
| tree | 92bd5b9067c49136fe76934669b33fb2f37c25be /pkg/openbsd | |
| parent | 7286f7e8e72e16819e1f4fb1f885abed7831ed85 (diff) | |
openbsd: doas: Use == -1 for error checking for consistency
Diffstat (limited to 'pkg/openbsd')
| -rw-r--r-- | pkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch | 10 | ||||
| -rw-r--r-- | pkg/openbsd/ver | 2 |
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 index 917d5975..321ba7b5 100644 --- 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 index a314d25d..c5038090 100644 --- a/pkg/openbsd/ver +++ b/pkg/openbsd/ver @@ -1 +1 @@ -6.8 r1 +6.8 r2 |
