git: a12058fae3bb - main - security/openssh-portable: Again fix procctl(2) usage
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Mar 2022 23:03:42 UTC
The branch main has been updated by bdrewery:
URL: https://cgit.FreeBSD.org/ports/commit/?id=a12058fae3bb09a1aba41d24383b6f1d93f2b330
commit a12058fae3bb09a1aba41d24383b6f1d93f2b330
Author: Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2022-03-07 22:49:28 +0000
Commit: Bryan Drewery <bdrewery@FreeBSD.org>
CommitDate: 2022-03-07 23:02:47 +0000
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
---
security/openssh-portable/Makefile | 2 +-
.../openssh-portable/files/patch-platform-tracing.c | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
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