* [gentoo-commits] repo/gentoo:master commit in: net-misc/telnet-bsd/, net-misc/telnet-bsd/files/
@ 2017-12-03 1:38 Thomas Deutschmann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Deutschmann @ 2017-12-03 1:38 UTC (permalink / raw
To: gentoo-commits
commit: c67c2aaab8cc8caeabd5257fbadebafed723c4e4
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 3 00:54:02 2017 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Dec 3 01:37:58 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c67c2aaa
net-misc/telnet-bsd: Fix compilation with format-security
Package-Manager: Portage-2.3.16, Repoman-2.3.6
net-misc/telnet-bsd/Manifest | 2 +-
.../files/telnet-bsd-1.2-format-security.patch | 52 ++++++++++++++++++++++
net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild | 3 +-
3 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/net-misc/telnet-bsd/Manifest b/net-misc/telnet-bsd/Manifest
index 6768f2a287e..3e381221311 100644
--- a/net-misc/telnet-bsd/Manifest
+++ b/net-misc/telnet-bsd/Manifest
@@ -1 +1 @@
-DIST telnet-bsd-1.2.tar.bz2 194518 SHA256 d6a9d26740ef75565cb1ed8ff11e327d240e6734748b2d1d2e96c126849e4733 SHA512 e3867362e1a2bc46779bcbc7631ccf08a0bfae84b71653e39099dc2db42995e5fcd39a978595006053e688430445db7ebb7a7bfbbb02a8e4dba209acbf66a69d WHIRLPOOL 673a5178f7c2305c9ad1ece9151d8d6c874ace147640f2d0e02a39f2641935af02fe42861c9ccc17b9f84e328c7e821f93ecf37dc3a86a9d1cf49700e7527f20
+DIST telnet-bsd-1.2.tar.bz2 194518 BLAKE2B 59b46a4717dfbf2dffebbab96446ec020da1fab4838bae053e5539f3f85834e11f304ad9f8cb143aefb73cb3c6c0734430a4317df6e8a9a236a122a1268f3bd8 SHA512 e3867362e1a2bc46779bcbc7631ccf08a0bfae84b71653e39099dc2db42995e5fcd39a978595006053e688430445db7ebb7a7bfbbb02a8e4dba209acbf66a69d
diff --git a/net-misc/telnet-bsd/files/telnet-bsd-1.2-format-security.patch b/net-misc/telnet-bsd/files/telnet-bsd-1.2-format-security.patch
new file mode 100644
index 00000000000..b167bcec964
--- /dev/null
+++ b/net-misc/telnet-bsd/files/telnet-bsd-1.2-format-security.patch
@@ -0,0 +1,52 @@
+--- a/telnet/utilities.c
++++ b/telnet/utilities.c
+@@ -739,22 +739,22 @@ printsub(char direction, unsigned char *pointer, int length)
+ case ENV_VAR:
+ if (pointer[1] == TELQUAL_SEND)
+ goto def_case;
+- fprintf(NetTrace, "\" VAR " + noquote);
++ fprintf(NetTrace, "%s", "\" VAR " + noquote);
+ noquote = 2;
+ break;
+
+ case ENV_VALUE:
+- fprintf(NetTrace, "\" VALUE " + noquote);
++ fprintf(NetTrace, "%s", "\" VALUE " + noquote);
+ noquote = 2;
+ break;
+
+ case ENV_ESC:
+- fprintf(NetTrace, "\" ESC " + noquote);
++ fprintf(NetTrace, "%s", "\" ESC " + noquote);
+ noquote = 2;
+ break;
+
+ case ENV_USERVAR:
+- fprintf(NetTrace, "\" USERVAR " + noquote);
++ fprintf(NetTrace, "%s", "\" USERVAR " + noquote);
+ noquote = 2;
+ break;
+
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -897,17 +897,17 @@ printsub(char direction, unsigned char *pointer, int length)
+ case ENV_VAR:
+ if (pointer[1] == TELQUAL_SEND)
+ goto def_case;
+- netoprintf("\" VAR " + noquote);
++ netoprintf("%s", "\" VAR " + noquote);
+ noquote = 2;
+ break;
+
+ case ENV_VALUE:
+- netoprintf("\" VALUE " + noquote);
++ netoprintf("%s", "\" VALUE " + noquote);
+ noquote = 2;
+ break;
+
+ case ENV_ESC:
+- netoprintf("\" ESC " + noquote);
++ netoprintf("%s", "\" ESC " + noquote);
+ noquote = 2;
+ break;
+
diff --git a/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild b/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
index 6b62c3f2817..562cbb58252 100644
--- a/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
+++ b/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -21,6 +21,7 @@ DEPEND="${RDEPEND}
src_prepare() {
epatch "${FILESDIR}"/${P}-fbsd.patch
+ epatch "${FILESDIR}"/${PN}-1.2-format-security.patch
eaclocal
eautoreconf
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/telnet-bsd/, net-misc/telnet-bsd/files/
@ 2024-07-26 8:28 Fabian Groffen
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Groffen @ 2024-07-26 8:28 UTC (permalink / raw
To: gentoo-commits
commit: 3dff12d1212dece67236358b1f198108abac2642
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 26 08:28:09 2024 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 08:28:09 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dff12d1
net-misc/telnet-bsd-1.2-r4: fix compilation on Solaris and Darwin
openpty is defined in util.h or temios.h instead of pty.h on Linux
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
.../files/telnet-bsd-1.2-openpty-util.patch | 31 ++++++++++++++++++++++
net-misc/telnet-bsd/telnet-bsd-1.2-r4.ebuild | 1 +
2 files changed, 32 insertions(+)
diff --git a/net-misc/telnet-bsd/files/telnet-bsd-1.2-openpty-util.patch b/net-misc/telnet-bsd/files/telnet-bsd-1.2-openpty-util.patch
new file mode 100644
index 000000000000..332e7951ea53
--- /dev/null
+++ b/net-misc/telnet-bsd/files/telnet-bsd-1.2-openpty-util.patch
@@ -0,0 +1,31 @@
+build: openpty is declared in different headers on some systems
+
+Check for util.h next to pty.h for openpty is declared in it on at least
+Darwin systems. Solaris needs termios.h
+
+--- telnet-bsd-1.2/configure.in 2024-07-26 10:13:46.814937718 +0200
++++ telnet-bsd-1.2/configure.in 2024-07-26 10:19:15.734016104 +0200
+@@ -12,7 +12,7 @@
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
+-AC_CHECK_HEADERS([pty.h utmp.h])
++AC_CHECK_HEADERS([pty.h util.h termios.h utmp.h])
+
+ if test x"$ac_default_prefix" = x"/usr"
+ then
+--- telnet-bsd-1.2/telnetd/sys_term.c 2024-07-26 10:13:46.859137256 +0200
++++ telnet-bsd-1.2/telnetd/sys_term.c 2024-07-26 10:19:54.700983107 +0200
+@@ -36,6 +36,12 @@
+ #ifdef HAVE_PTY_H
+ #include <pty.h>
+ #endif
++#ifdef HAVE_UTIL_H
++#include <util.h>
++#endif
++#ifdef HAVE_TERMIOS_H
++#include <termios.h>
++#endif
+
+ #include "telnetd.h"
+ #include "pathnames.h"
diff --git a/net-misc/telnet-bsd/telnet-bsd-1.2-r4.ebuild b/net-misc/telnet-bsd/telnet-bsd-1.2-r4.ebuild
index 8ba189abbfd1..582837e7ab7c 100644
--- a/net-misc/telnet-bsd/telnet-bsd-1.2-r4.ebuild
+++ b/net-misc/telnet-bsd/telnet-bsd-1.2-r4.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
"${FILESDIR}"/${P}-fbsd.patch
"${FILESDIR}"/${PN}-1.2-format-security.patch
"${FILESDIR}"/${P}-musl.patch
+ "${FILESDIR}"/${P}-openpty-util.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-26 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 8:28 [gentoo-commits] repo/gentoo:master commit in: net-misc/telnet-bsd/, net-misc/telnet-bsd/files/ Fabian Groffen
-- strict thread matches above, loose matches on Subject: below --
2017-12-03 1:38 Thomas Deutschmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox