update screen
Hanno Böck

Hanno Böck commited on 2023-05-15 13:14:01
Zeige 3 geänderte Dateien mit 179 Einfügungen und 5 Löschungen.

... ...
@@ -1,6 +1 @@
1
-AUX screen-4.3.0-no-utempter.patch 341 BLAKE2B 3339783b3574f82f093c82a613ad18c5c58c184c082c2c311281cdd57e7176abae0f5935466a4a8b4d931d1d1b93d8f0a4e6b558a268553af4a0170061e6ebfe SHA512 f4191ba1ecac3076f958f56309c0a1d523b455fa4e3388f1cfca59c8ccff0afdfb20ef18d54794ba539b2b6d1511ed599dc44787344dc5ccce2902c9b9848155
2
-AUX screen-4.6.2-utmp-exit.patch 1558 BLAKE2B e08e83f8b9f0cd09cd9bad4486a75d71bd899a7917954702ece0837099639079a746138374cbeaf71072cca64ae36a3c2a32250123c6747089e724272227e0dd SHA512 0e7c6c224f6fb8e01650b778cb2b155942752504dc97112d9594b7fa0da1bb8bd828240a2519b1c21f1c162181da89a8daa51ef7f74c8ced0b85cdb3e911a67c
3
-AUX screen-4.9.0-configure-implicit-function-decls.patch 16667 BLAKE2B 6079042dae21c51b81176aadf27314cf0502fcee995bd9668102bc114ac0c2fdb6587fe2c647cbd92d994cb9b6fdba9e259a1f0a6bd7cf7d7905c3f7e36e8aff SHA512 c9ff18fccba0a0ed19e64509ea128b91bbb6fac405e8395ce724435f1af2f2015f645342aa1fc1b4cb023927412db6e1c242c8060a81deab2a8c064523dedd4d
4
-AUX screenrc 10412 BLAKE2B f4866f4a83b22c37484b66e4c7d52ec479fe12ae3e72e5c9e769b1b543ecf04d14ef4339e1c72064741cbf39502ef82d3beb213326a30889f128e135f60bd528 SHA512 06fbec5e28480a2c369330fac0c94faa47e5d28e037d9fefd0cb3e813002c504866dc8ac86872b7ac6f16059a219e396a9c425b578b8afe882153ddb506158f7
5 1
 DIST screen-4.9.0.tar.gz 798229 BLAKE2B 0f64a14ce9a719bd4a6d045c55069769045a09ee2086c44c2e3d9da6d1e5ada2f094e00e16029767e1155ce35d4f360d0e2879995eefa052f3214ced71b7617c SHA512 18bbb085d77ecd02cbc02fa88a945c39f06e0c6de4eeaa16b278440dac5c9896811abbe0838144e997cd344ae08b9530399fa8fcb31a65fc571ead90e8307f84
6
-EBUILD screen-4.9.0-r1.ebuild 3801 BLAKE2B 371153d0e6ab88c520622a1ffdc58ac05d44972f0d595dbe7ef45863b99630cf6435bece218456089b39cdd3631dfea65e5c6050440f17461e6f52e2288a9e0f SHA512 aafafa8e3a7ce28a50037bc57246d9b43c6928021c2618dc36954d0c4e410f5336b8d77819140b1eae8bd43750d1ee8fa624e6bd502239ef39f58bd6d88fec9d
... ...
@@ -0,0 +1,33 @@
1
+From e9ad41bfedb4537a6f0de20f00b27c7739f168f7 Mon Sep 17 00:00:00 2001
2
+From: Alexander Naumov <alexander_naumov@opensuse.org>
3
+Date: Mon, 30 Jan 2023 17:22:25 +0200
4
+Subject: fix: missing signal sending permission check on failed query messages
5
+
6
+Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
7
+---
8
+ socket.c | 9 +++++++--
9
+ 1 file changed, 7 insertions(+), 2 deletions(-)
10
+
11
+diff --git a/socket.c b/socket.c
12
+index 147dc54..54d8cb8 100644
13
+--- a/socket.c
14
++++ b/socket.c
15
+@@ -1285,11 +1285,16 @@ ReceiveMsg()
16
+           else
17
+             queryflag = -1;
18
+ 
19
+-          Kill(m.m.command.apid,
20
++          if (CheckPid(m.m.command.apid)) {
21
++            Msg(0, "Query attempt with bad pid(%d)!", m.m.command.apid);
22
++          }
23
++          else {
24
++            Kill(m.m.command.apid,
25
+                (queryflag >= 0)
26
+                    ? SIGCONT
27
+                    : SIG_BYE); /* Send SIG_BYE if an error happened */
28
+-          queryflag = -1;
29
++            queryflag = -1;
30
++          }
31
+         }
32
+         break;
33
+       case MSG_COMMAND:
... ...
@@ -0,0 +1,146 @@
1
+# Copyright 1999-2023 Gentoo Authors
2
+# Distributed under the terms of the GNU General Public License v2
3
+
4
+EAPI=8
5
+
6
+inherit autotools flag-o-matic pam tmpfiles
7
+
8
+DESCRIPTION="screen manager with VT100/ANSI terminal emulation"
9
+HOMEPAGE="https://www.gnu.org/software/screen/"
10
+
11
+if [[ ${PV} != 9999 ]] ; then
12
+	SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
13
+	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
14
+else
15
+	inherit git-r3
16
+	EGIT_REPO_URI="https://git.savannah.gnu.org/git/screen.git"
17
+	EGIT_CHECKOUT_DIR="${WORKDIR}/${P}" # needed for setting S later on
18
+	S="${WORKDIR}"/${P}/src
19
+fi
20
+
21
+LICENSE="GPL-3+"
22
+SLOT="0"
23
+IUSE="debug nethack pam selinux multiuser"
24
+
25
+DEPEND=">=sys-libs/ncurses-5.2:=
26
+	virtual/libcrypt:=
27
+	pam? ( sys-libs/pam )"
28
+RDEPEND="${DEPEND}
29
+	acct-group/utmp
30
+	selinux? ( sec-policy/selinux-screen )"
31
+BDEPEND="sys-apps/texinfo"
32
+
33
+PATCHES=(
34
+	# Don't use utempter even if it is found on the system.
35
+	"${FILESDIR}"/${PN}-4.3.0-no-utempter.patch
36
+	"${FILESDIR}"/${PN}-4.6.2-utmp-exit.patch
37
+	"${FILESDIR}"/${PN}-4.9.0-configure-implicit-function-decls.patch
38
+	"${FILESDIR}"/${P}-CVE-2023-24626.patch
39
+)
40
+
41
+src_prepare() {
42
+	default
43
+
44
+	# sched.h is a system header and causes problems with some C libraries
45
+	mv sched.h _sched.h || die
46
+	sed -i '/include/ s:sched.h:_sched.h:' screen.h || die
47
+
48
+	# Fix manpage
49
+	sed -i \
50
+		-e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \
51
+		-e "s:/usr/local/screens:${EPREFIX}/tmp/screen:g" \
52
+		-e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \
53
+		-e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \
54
+		-e "s:/local/screens/S\\\-:${EPREFIX}/tmp/screen/S\\\-:g" \
55
+		doc/screen.1 || die
56
+
57
+	if [[ ${CHOST} == *-darwin* ]] || use elibc_musl; then
58
+		sed -i -e '/^#define UTMPOK/s/define/undef/' acconfig.h || die
59
+	fi
60
+
61
+	# disable musl dummy headers for utmp[x]
62
+	use elibc_musl && append-cppflags "-D_UTMP_H -D_UTMPX_H"
63
+
64
+	# reconfigure
65
+	eautoreconf
66
+}
67
+
68
+src_configure() {
69
+	append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}"
70
+
71
+	if [[ ${CHOST} == *-solaris* ]]; then
72
+		# enable msg_header by upping the feature standard compatible
73
+		# with c99 mode
74
+		append-cppflags -D_XOPEN_SOURCE=600
75
+	fi
76
+
77
+	use nethack || append-cppflags "-DNONETHACK"
78
+	use debug && append-cppflags "-DDEBUG"
79
+
80
+	local myeconfargs=(
81
+		--with-sys-screenrc="${EPREFIX}/etc/screenrc"
82
+		--with-pty-mode=0620
83
+		--with-pty-group=5
84
+		--enable-rxvt_osc
85
+		--enable-telnet
86
+		--enable-colors256
87
+		$(use_enable pam)
88
+	)
89
+	econf "${myeconfargs[@]}"
90
+}
91
+
92
+src_compile() {
93
+	LC_ALL=POSIX emake comm.h term.h
94
+	emake osdef.h
95
+
96
+	emake -C doc screen.info
97
+	default
98
+}
99
+
100
+src_install() {
101
+	local DOCS=(
102
+		README ChangeLog INSTALL TODO NEWS* patchlevel.h
103
+		doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps}
104
+	)
105
+
106
+	emake DESTDIR="${D}" SCREEN="${P}" install
107
+
108
+	local tmpfiles_perms tmpfiles_group
109
+
110
+	if use multiuser || use prefix ; then
111
+		fperms 4755 /usr/bin/${P}
112
+		tmpfiles_perms="0755"
113
+		tmpfiles_group="root"
114
+	else
115
+		fowners root:utmp /usr/bin/${P}
116
+		fperms 2755 /usr/bin/${P}
117
+		tmpfiles_perms="0775"
118
+		tmpfiles_group="utmp"
119
+	fi
120
+
121
+	newtmpfiles - screen.conf <<<"d /tmp/screen ${tmpfiles_perms} root ${tmpfiles_group}"
122
+
123
+	insinto /usr/share/${PN}
124
+	doins terminfo/{screencap,screeninfo.src}
125
+
126
+	insinto /etc
127
+	doins "${FILESDIR}"/screenrc
128
+
129
+	if use pam; then
130
+		pamd_mimic_system screen auth
131
+	fi
132
+
133
+	dodoc "${DOCS[@]}"
134
+}
135
+
136
+pkg_postinst() {
137
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
138
+		elog "Some dangerous key bindings have been removed or changed to more safe values."
139
+		elog "We enable some xterm hacks in our default screenrc, which might break some"
140
+		elog "applications. Please check /etc/screenrc for information on these changes."
141
+	fi
142
+
143
+	tmpfiles_process screen.conf
144
+
145
+	ewarn "This revision changes the screen socket location to ${EROOT}/tmp/${PN}"
146
+}
0 147