aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2022-03-07 22:49:28 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2022-03-07 23:02:47 +0000
commita12058fae3bb09a1aba41d24383b6f1d93f2b330 (patch)
tree403134ad28195abdddd061be6a2415b57c6443c9
parentdf3a937145b1bef1b3c08515dc6619b12654415f (diff)
downloadports-a12058fae3bb09a1aba41d24383b6f1d93f2b330.tar.gz
ports-a12058fae3bb09a1aba41d24383b6f1d93f2b330.zip
security/openssh-portable: Again fix procctl(2) usage
The 8.9p1 update was supposed to have a fix for incorrect use of procctl(2) but was left out for some reason. A wrong assumption missed keeping it in ae66cffc19f357cbd5. PR: 262352
-rw-r--r--security/openssh-portable/Makefile2
-rw-r--r--security/openssh-portable/files/patch-platform-tracing.c21
2 files changed, 22 insertions, 1 deletions
diff --git a/security/openssh-portable/Makefile b/security/openssh-portable/Makefile
index defef139f14e..ee88c6fca548 100644
--- a/security/openssh-portable/Makefile
+++ b/security/openssh-portable/Makefile
@@ -2,7 +2,7 @@
PORTNAME= openssh
DISTVERSION= 8.9p1
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= security
MASTER_SITES= OPENBSD/OpenSSH/portable
diff --git a/security/openssh-portable/files/patch-platform-tracing.c b/security/openssh-portable/files/patch-platform-tracing.c
new file mode 100644
index 000000000000..160def21ac3e
--- /dev/null
+++ b/security/openssh-portable/files/patch-platform-tracing.c
@@ -0,0 +1,21 @@
+--- platform-tracing.c.orig 2022-03-07 14:48:27.152541000 -0800
++++ platform-tracing.c 2022-03-07 14:56:33.402458000 -0800
+@@ -32,6 +32,9 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
++#if defined(HAVE_PROCCTL)
++#include <unistd.h>
++#endif
+
+ #include "log.h"
+
+@@ -42,7 +45,7 @@ platform_disable_tracing(int strict)
+ /* On FreeBSD, we should make this process untraceable */
+ int disable_trace = PROC_TRACE_CTL_DISABLE;
+
+- if (procctl(P_PID, 0, PROC_TRACE_CTL, &disable_trace) && strict)
++ if (procctl(P_PID, getpid(), PROC_TRACE_CTL, &disable_trace) && strict)
+ fatal("unable to make the process untraceable: %s",
+ strerror(errno));
+ #endif