pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/38988 (was: [PATCH] upgrade rxvt-unicode to 9.05)
The following reply was made to PR pkg/38988; it has been noted by GNATS.
From: Taylor R Campbell <campbell%mumble.net@localhost>
To: obache%netbsd.org@localhost
Cc: pkgsrc-users%netbsd.org@localhost, gnats-bugs%netbsd.org@localhost
Subject: Re: pkg/38988 (was: [PATCH] upgrade rxvt-unicode to 9.05)
Date: Mon, 18 Aug 2008 21:28:55 -0400
This is a multi-part message in MIME format.
--=_8hbVPY6vckbQCt3zkK98N1iExJxISh6n
Date: Tue, 19 Aug 2008 09:01:17 +0900
From: "OBATA Akio" <obache%netbsd.org@localhost>
Can you also note this patch in GNATS PR pkg/38988?
Just send to gnats-bugs%NetBSD.org@localhost with subject Re: pkg/38988.
Whoops! Sorry, I knew I must have botched something, and that was
looking in the PRs. Probably what I called patch-ac, for fixing
socket message ancillary data buffers, should be done separately.
The originator of pkg/38988 was right to omit the assignment of
CONFIGURE_ARGS from the Makefile; I agree with his assessment of all
the options there. However:
- rxvt-unicode-9.05 still uses snprintf;
- it does not use Perl if the perl option is disabled;
- <http://dist.schmorp.de/rxvt-unicode/Attic/> should remain in the
list of master sites, for when the next version of rxvt-unicode is
released upstream (my understanding is that only the most recent
release is in <http://dist.schmorp.de/rxvt-unicode/>, and that all
the others are in the Attic/ subdirectory);
- <http://software.schmorp.de/pkg/rxvt-unicode.html>, as far as I can
tell, is still the home page of urxvt, not
<http://dist.schmorp.de/rxvt-unicode/>, which is where the files are
released;
- patch-ab is still important, since rxvt-unicode has not changed
upstream to fix the issue;
- I suspect that using the print-PLIST target will strip the
${PLIST.perl} directives in the PLIST, causing the problem the
originator encountered with Perl files in the PLIST when installing
with the perl option disabled; and, indeed,
- the PLIST need only omit lib/urxvt/perl/automove-background, as I
mentioned in my original email (it was removed from, and its
functionality folded into, rxvt-unicode-9.05).
I've created a revised patch for pkgsrc, and I have also separately
attached the patch for rxvt-unicode, which I formerly called patch-ac,
to fix the use of socket message ancillary data in src/fdpass.C.
(I'll file this as a separate PR, too, if that would be better; and
I'll also send it to the upstream urxvt author when I get a chance.)
--=_8hbVPY6vckbQCt3zkK98N1iExJxISh6n
Content-Type: text/plain; charset="iso-8859-1"; name="rxvt-unicode-9.05"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="rxvt-unicode-9.05.patch"
Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/x11/rxvt-unicode/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile 3 Apr 2008 22:36:52 -0000 1.22
+++ Makefile 19 Aug 2008 01:22:49 -0000
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.22 2008/04/03 22:36:52 tonnerre Exp $
#
=20
-DISTNAME=3D rxvt-unicode-8.3
-PKGREVISION=3D 3
+DISTNAME=3D rxvt-unicode-9.05
CATEGORIES=3D x11
MASTER_SITES=3D http://dist.schmorp.de/rxvt-unicode/ \
http://dist.schmorp.de/rxvt-unicode/Attic/
@@ -17,12 +16,11 @@
USE_TOOLS+=3D pkg-config
USE_FEATURES+=3D snprintf
=20
-CONFIGURE_ARGS+=3D --enable-transparency \
- --enable-menubar \
- --enable-xpm-background \
- --enable-xgetdefault \
- --enable-24bit
-CONFIGURE_ENV+=3D ac_cv_path_TIC=3Dno
+# Setting this to `no' causes an error when doc/Makefile in 9.05 tries
+# to invoke it unconditionally. Setting this to `:' causes nothing to
+# happen at all, and this is simpler than patching doc/Makefile.in to
+# revert the change that was made to it.
+CONFIGURE_ENV+=3D ac_cv_path_TIC=3D:
=20
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rxvt-unicode
Index: PLIST
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/x11/rxvt-unicode/PLIST,v
retrieving revision 1.8
diff -u -r1.8 PLIST
--- PLIST 12 Apr 2008 22:43:15 -0000 1.8
+++ PLIST 19 Aug 2008 01:22:49 -0000
@@ -2,7 +2,6 @@
bin/urxvt
bin/urxvtc
bin/urxvtd
-${PLIST.perl}lib/urxvt/perl/automove-background
${PLIST.perl}lib/urxvt/perl/block-graphics-to-ascii
${PLIST.perl}lib/urxvt/perl/digital-clock
${PLIST.perl}lib/urxvt/perl/example-refresh-hooks
Index: distinfo
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/x11/rxvt-unicode/distinfo,v
retrieving revision 1.11
diff -u -r1.11 distinfo
--- distinfo 3 Apr 2008 22:36:52 -0000 1.11
+++ distinfo 19 Aug 2008 01:22:49 -0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.11 2008/04/03 22:36:52 tonnerre Exp $
+$NetBSD$
=20
-SHA1 (rxvt-unicode-8.3.tar.bz2) =3D cd335c47543ba086585a296ca0fe7445c07120=
dd
-RMD160 (rxvt-unicode-8.3.tar.bz2) =3D 000dbcb1ff297edbff0a8b21dbbba3db3085=
4579
-Size (rxvt-unicode-8.3.tar.bz2) =3D 885212 bytes
-SHA1 (patch-aa) =3D e5760c57a6b47780ee851efe09dda5f2f02fca40
-SHA1 (patch-ab) =3D 2bfbffea8d63ebd65bfa9b0dc43a1901f844137e
+SHA1 (rxvt-unicode-9.05.tar.bz2) =3D 758d57a88c3521f780bcd21c70d3995f53a2f=
6e3
+RMD160 (rxvt-unicode-9.05.tar.bz2) =3D 0f4343a9aa0a8b26d10c6049c1afca2cc75=
69fc3
+Size (rxvt-unicode-9.05.tar.bz2) =3D 865815 bytes
+SHA1 (patch-aa) =3D 0b86573cb5b1ae71b4a36ffd62355329d45c98ed
+SHA1 (patch-ab) =3D 6a6991089f3caa20dc1725024fc72f1035bd901f
Index: patches/patch-aa
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/x11/rxvt-unicode/patches/patch-aa,v
retrieving revision 1.5
diff -u -r1.5 patch-aa
--- patches/patch-aa 6 Aug 2007 10:02:27 -0000 1.5
+++ patches/patch-aa 19 Aug 2008 01:22:49 -0000
@@ -1,14 +1,15 @@
$NetBSD: patch-aa,v 1.5 2007/08/06 10:02:27 ghen Exp $
=20
---- configure.orig 2007-08-06 10:26:41.000000000 +0200
-+++ configure 2007-08-06 10:29:20.000000000 +0200
-@@ -3877,57 +3877,6 @@
+--- configure.orig 2008-05-05 16:49:02.000000000 +0000
++++ configure 2008-08-18 18:01:09.000000000 +0000
+@@ -3851,57 +3851,6 @@
+ fi
LINKER=3D$LINKER
=20
-=20
+-
-if test -z "$orig_CXXFLAGS"; then
- if test x$GCC =3D xyes && test "x$GXX" =3D xyes; then
-- CXXFLAGS=3D"-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs"
+- CXXFLAGS=3D"-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threads=
afe-statics -fno-enforce-eh-specs"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
@@ -56,26 +57,6 @@
- CFLAGS=3D"$CXXFLAGS"
-fi
-
--
- cat >>confdefs.h <<\_ACEOF
- #define _GNU_SOURCE 1
- _ACEOF
-@@ -6691,11 +6640,16 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
+ case $host in
+ *-*-solaris* )
=20
-+extern "C" {
-+#include <X11/xpm.h>
-+#include <stddef.h>
-+}
-+
- int
- main ()
- {
--XpmReadFileToPixmap()
-- ;
-+ Drawable d;
-+ XpmReadFileToPixmap(NULL, d, NULL, NULL, NULL, NULL);
- return 0;
- }
- _ACEOF
Index: patches/patch-ab
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/x11/rxvt-unicode/patches/patch-ab,v
retrieving revision 1.4
diff -u -r1.4 patch-ab
--- patches/patch-ab 3 Apr 2008 22:36:52 -0000 1.4
+++ patches/patch-ab 19 Aug 2008 01:22:49 -0000
@@ -2,9 +2,9 @@
=20
Fix default display vulnerability (CVE-2008-1142).
=20
---- src/init.C.orig 2007-08-01 19:35:02.000000000 +0200
-+++ src/init.C
-@@ -299,11 +299,13 @@ rxvt_term::init_resources (int argc, con
+--- src/init.C.orig 2008-06-15 13:50:33.000000000 +0000
++++ src/init.C 2008-08-18 17:37:41.000000000 +0000
+@@ -372,11 +372,13 @@ rxvt_term::init_resources (int argc, con
* Open display, get options/resources and create the window
*/
=20
@@ -18,5 +18,5 @@
+ rxvt_fatal ("no display given and DISPLAY not set, aborting.\n");
+
if (!(display =3D displays.get (rs[Rs_display_name])))
- rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]=
);
-=20
+ {
+ free (r_argv);
--=_8hbVPY6vckbQCt3zkK98N1iExJxISh6n
Content-Type: text/plain; charset="iso-8859-1"; name="fdpass-cmsg"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="fdpass-cmsg.patch"
--- src/fdpass.C.orig 2007-06-25 23:47:14.000000000 +0000
+++ src/fdpass.C 2008-08-09 00:41:29.000000000 +0000
@@ -26,6 +26,7 @@
#include "../config.h"
=20
#include <cstddef> // needed by broken bsds for NULL used in sys/uio.h
+#include <cstdlib>
=20
#include <sys/types.h>
#include <sys/uio.h>
@@ -33,7 +34,12 @@
=20
#include "libptytty.h"
=20
-#ifndef CMSG_LEN // CMSG_SPACE && CMSG_LEN are rfc2292 extensions to unix
+// CMSG_SPACE & CMSG_LEN are rfc2292 extensions to unix
+#ifndef CMSG_SPACE
+# define CMSG_SPACE(len) (sizeof (cmsghdr) + len)
+#endif
+
+#ifndef CMSG_LEN
# define CMSG_LEN(len) (sizeof (cmsghdr) + len)
#endif
=20
@@ -42,9 +48,13 @@ ptytty::send_fd (int socket, int fd)
{
msghdr msg;
iovec iov;
- char buf [CMSG_LEN (sizeof (int))];
+ void *buf;
+ cmsghdr *cmsg;
char data =3D 0;
=20
+ if ((buf =3D malloc (CMSG_SPACE (sizeof (int)))) =3D=3D NULL)
+ return 0;
+
iov.iov_base =3D &data;
iov.iov_len =3D 1;
=20
@@ -52,19 +62,19 @@ ptytty::send_fd (int socket, int fd)
msg.msg_namelen =3D 0;
msg.msg_iov =3D &iov;
msg.msg_iovlen =3D 1;
- msg.msg_control =3D (void *)buf;
- msg.msg_controllen =3D sizeof buf;
+ msg.msg_control =3D buf;
+ msg.msg_controllen =3D CMSG_SPACE (sizeof (int));
=20
- cmsghdr *cmsg =3D CMSG_FIRSTHDR (&msg);
+ cmsg =3D CMSG_FIRSTHDR (&msg);
cmsg->cmsg_level =3D SOL_SOCKET;
cmsg->cmsg_type =3D SCM_RIGHTS;
cmsg->cmsg_len =3D CMSG_LEN (sizeof (int));
=20
*(int *)CMSG_DATA (cmsg) =3D fd;
=20
- msg.msg_controllen =3D cmsg->cmsg_len;
-
- return sendmsg (socket, &msg, 0) >=3D 0;
+ ssize_t result =3D sendmsg (socket, &msg, 0);
+ free (buf);
+ return result >=3D 0;
}
=20
int
@@ -72,8 +82,13 @@ ptytty::recv_fd (int socket)
{
msghdr msg;
iovec iov;
- char buf [CMSG_LEN (sizeof (int))]; /* ancillary data buffer */
+ void *buf;
+ cmsghdr *cmsg;
char data =3D 1;
+ int fd =3D -1;
+
+ if ((buf =3D malloc (CMSG_SPACE (sizeof (int)))) =3D=3D NULL)
+ return -1;
=20
iov.iov_base =3D &data;
iov.iov_len =3D 1;
@@ -83,23 +98,23 @@ ptytty::recv_fd (int socket)
msg.msg_iov =3D &iov;
msg.msg_iovlen =3D 1;
msg.msg_control =3D buf;
- msg.msg_controllen =3D sizeof buf;
-
- cmsghdr *cmsg =3D CMSG_FIRSTHDR (&msg);
- cmsg->cmsg_level =3D SOL_SOCKET;
- cmsg->cmsg_type =3D SCM_RIGHTS;
- cmsg->cmsg_len =3D CMSG_LEN (sizeof (int));
-
- msg.msg_controllen =3D cmsg->cmsg_len;
+ msg.msg_controllen =3D CMSG_SPACE (sizeof (int));
=20
if (recvmsg (socket, &msg, 0) <=3D 0
|| data !=3D 0
- || msg.msg_controllen < CMSG_LEN (sizeof (int))
- || cmsg->cmsg_level !=3D SOL_SOCKET
+ || msg.msg_controllen < CMSG_SPACE (sizeof (int)))
+ goto exit;
+
+ cmsg =3D CMSG_FIRSTHDR (&msg);
+ if (cmsg->cmsg_level !=3D SOL_SOCKET
|| cmsg->cmsg_type !=3D SCM_RIGHTS
|| cmsg->cmsg_len < CMSG_LEN (sizeof (int)))
- return -1;
+ goto exit;
+
+ fd =3D *(int *)CMSG_DATA (cmsg);
=20
- return *(int *)CMSG_DATA (cmsg);
+ exit:
+ free (buf);
+ return fd;
}
=20
--=_8hbVPY6vckbQCt3zkK98N1iExJxISh6n--
Home |
Main Index |
Thread Index |
Old Index