aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2021-10-15 16:44:40 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2021-10-15 17:10:21 +0000
commitf4a5ae5fd8ee4948c8b7d1c9bfd0e07d33a8aa18 (patch)
tree1c086126f87b2893da17ab84abba418d359bd39f
parentc06d0e33d7b16dcc48c9c0809841dd29f778bc41 (diff)
downloadports-f4a5ae5fd8ee4948c8b7d1c9bfd0e07d33a8aa18.tar.gz
ports-f4a5ae5fd8ee4948c8b7d1c9bfd0e07d33a8aa18.zip
security/openssh-portable: Fix sftp crash
This fixes an error trying to disabling process tracing. It has been sent upstream. PR: 259174 Submitted by: mike at sentex dot net
-rw-r--r--security/openssh-portable/Makefile2
-rw-r--r--security/openssh-portable/files/patch-platform-tracing.c25
2 files changed, 26 insertions, 1 deletions
diff --git a/security/openssh-portable/Makefile b/security/openssh-portable/Makefile
index 309edc422ff3..b5c9e473c388 100644
--- a/security/openssh-portable/Makefile
+++ b/security/openssh-portable/Makefile
@@ -2,7 +2,7 @@
PORTNAME= openssh
DISTVERSION= 8.8p1
-PORTREVISION= 0
+PORTREVISION= 1
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..54f6db4421ad
--- /dev/null
+++ b/security/openssh-portable/files/patch-platform-tracing.c
@@ -0,0 +1,25 @@
+--- platform-tracing.c.orig 2021-09-26 07:03:19.000000000 -0700
++++ platform-tracing.c 2021-10-15 10:08:20.537813000 -0700
+@@ -16,6 +16,10 @@
+
+ #include "includes.h"
+
++#if defined(HAVE_PROCCTL)
++#include <string.h>
++#include <unistd.h>
++#endif
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_PROCCTL_H
+ #include <sys/procctl.h>
+@@ -40,8 +44,9 @@ 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)
+- fatal("unable to make the process untraceable");
++ if (procctl(P_PID, getpid(), PROC_TRACE_CTL, &disable_trace) && strict)
++ fatal("unable to make the process untraceable: %s for pid %d",
++ strerror(errno), (int)getpid());
+ #endif
+ #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+ /* Disable ptrace on Linux without sgid bit */