diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 43f5d82..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -vnc-4_1_2-unixsrc.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff6e528 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vnc-4_1_3-unixsrc.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index b1cbf0f..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vnc -# $Id: Makefile,v 1.1 2004/09/09 14:02:00 cvsdist Exp $ -NAME := vnc -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/Makefile.am b/Makefile.am index 59386d3..e310ac9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,8 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \ Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \ $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11 +Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) + libvnc_la_LTLIBRARIES = libvnc.la libvnc_ladir = $(moduledir)/extensions diff --git a/sources b/sources index 665d952..de11a95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf9a6fe8f592286b5e0fdde686504ffb vnc-4_1_2-unixsrc.tar.gz +a119f3c75ad2767c0588260e2abe39be vnc-4_1_3-unixsrc.tar.gz diff --git a/vnc-210617.patch b/vnc-210617.patch deleted file mode 100644 index b242048..0000000 --- a/vnc-210617.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2006-10-13 11:31:37.000000000 +0100 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2006-10-13 12:05:40.000000000 +0100 -@@ -106,11 +106,29 @@ - TcpSocket::TcpSocket(const char *host, int port) - : closeFd(true) - { -+ struct sockaddr_storage addr; -+ size_t addrlen; -+ struct addrinfo *hostai; - int sock; - -- // - Create a socket - initSockets(); -- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) -+ -+ if (getaddrinfo(host, NULL, NULL, &hostai)) { -+ int e = errorNumber; -+ throw SocketException("unable to resolve host by name", e); -+ } -+ -+ addrlen = hostai->ai_addrlen; -+ memset(&addr, 0, sizeof(addr)); -+ memcpy(&addr, hostai->ai_addr, addrlen); -+ freeaddrinfo(hostai); -+ if (addr.ss_family == AF_INET) -+ ((struct sockaddr_in *)&addr)->sin_port = htons(port); -+ else if (addr.ss_family == AF_INET6) -+ ((struct sockaddr_in6 *)&addr)->sin6_port = htons(port); -+ -+ // - Create a socket -+ if ((sock = socket(addr.ss_family, SOCK_STREAM, 0)) < 0) - throw SocketException("unable to create socket", errorNumber); - - #ifndef WIN32 -@@ -118,30 +136,9 @@ - fcntl(sock, F_SETFD, FD_CLOEXEC); - #endif - -- // - Connect it to something -- -- // Try processing the host as an IP address -- struct sockaddr_in addr; -- memset(&addr, 0, sizeof(addr)); -- addr.sin_family = AF_INET; -- addr.sin_addr.s_addr = inet_addr(host); -- addr.sin_port = htons(port); -- if ((int)addr.sin_addr.s_addr == -1) { -- // Host was not an IP address - try resolving as DNS name -- struct hostent *hostinfo; -- hostinfo = gethostbyname(host); -- if (hostinfo && hostinfo->h_addr) { -- addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; -- } else { -- int e = errorNumber; -- closesocket(sock); -- throw SocketException("unable to resolve host by name", e); -- } -- } -- - // Attempt to connect to the remote host - for (;;) { -- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { -+ if (connect(sock, (struct sockaddr *)&addr, addrlen) != 0) { - int e = errorNumber; - if (e == EINTR) - continue; - diff --git a/vnc-noxkb.patch b/vnc-noxkb.patch deleted file mode 100644 index 4a523f4..0000000 --- a/vnc-noxkb.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.noxkb vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.noxkb 2008-03-05 13:02:23.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-03-05 13:02:41.000000000 +0100 -@@ -1009,7 +1009,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten - - AC_DEFINE(XKB, 1, [Build XKB]) - AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) --AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) -+AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default]) - REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" - XKB_LIB='$(top_builddir)/xkb/libxkb.la' - XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' diff --git a/vnc-viewerIPv6.patch b/vnc-viewerIPv6.patch new file mode 100644 index 0000000..82e4fa0 --- /dev/null +++ b/vnc-viewerIPv6.patch @@ -0,0 +1,192 @@ +diff -up vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 vnc-4_1_2-unixsrc/common/network/Makefile.am +--- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 2008-06-02 10:22:17.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2008-06-02 10:52:56.000000000 +0200 +@@ -1,5 +1,7 @@ + noinst_LTLIBRARIES = libnetwork.la + ++libnetwork_la_CPPFLAGS = -DHAVE_GETADDRINFO ++ + libnetwork_la_SOURCES = \ + Socket.h \ + TcpSocket.cxx \ +diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx +--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2008-06-02 10:22:17.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-06-02 10:49:04.000000000 +0200 +@@ -109,50 +109,99 @@ TcpSocket::TcpSocket(int sock, bool clos + TcpSocket::TcpSocket(const char *host, int port) + : closeFd(true) + { +- int sock; ++#define CAST_ADDR(x) (*((struct x *)&addr)) ++ int sock, err, family, result = -1; ++ size_t addrlen; ++ struct sockaddr_storage addr; ++#ifdef HAVE_GETADDRINFO ++ struct addrinfo *ai, *current, hints; ++#endif + + // - Create a socket + initSockets(); +- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) +- throw SocketException("unable to create socket", errorNumber); + +-#ifndef WIN32 +- // - By default, close the socket on exec() +- fcntl(sock, F_SETFD, FD_CLOEXEC); +-#endif ++#ifdef HAVE_GETADDRINFO ++ memset(&hints, 0, sizeof(struct addrinfo)); ++ hints.ai_family = AF_UNSPEC; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_canonname = NULL; ++ hints.ai_addr = NULL; ++ hints.ai_next = NULL; ++ ++ if ((result = getaddrinfo(host, NULL, &hints, &ai)) != 0) { ++ throw Exception("unable to resolve host by name: %s", ++ gai_strerror(result)); ++ } ++ ++ for (current = ai; current != NULL; current = current->ai_next) { ++ family = current->ai_family; ++ if (family != AF_INET && family != AF_INET6) ++ continue; ++ ++ addrlen = current->ai_addrlen; ++ memcpy(&addr, current->ai_addr, addrlen); ++ ++ if (family == AF_INET) ++ CAST_ADDR(sockaddr_in).sin_port = htons(port); ++ else ++ CAST_ADDR(sockaddr_in6).sin6_port = htons(port); + +- // - Connect it to something ++#else ++ family = AF_INET; ++ addrlen = sizeof(struct sockaddr_in); + +- // Try processing the host as an IP address +- struct sockaddr_in addr; +- memset(&addr, 0, sizeof(addr)); +- addr.sin_family = AF_INET; +- addr.sin_addr.s_addr = inet_addr(host); +- addr.sin_port = htons(port); +- if ((int)addr.sin_addr.s_addr == -1) { +- // Host was not an IP address - try resolving as DNS name +- struct hostent *hostinfo; +- hostinfo = gethostbyname(host); +- if (hostinfo && hostinfo->h_addr) { +- addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; +- } else { +- int e = errorNumber; +- closesocket(sock); +- throw SocketException("unable to resolve host by name", e); ++ // Try processing the host as an IP address ++ memset(&addr, 0, addrlen); ++ CAST_ADDR(sockaddr_in).sin_family = AF_INET; ++ CAST_ADDR(sockaddr_in).sin_addr.s_addr = inet_addr(host); ++ CAST_ADDR(sockaddr_in).sin_port = htons(port); ++ if ((int)CAST_ADDR(sockaddr_in).sin_addr.s_addr == -1) { ++ // Host was not an IP address - try resolving as DNS name ++ struct hostent *hostinfo; ++ hostinfo = gethostbyname(host); ++ if (hostinfo && hostinfo->h_addr) { ++ CAST_ADDR(sockaddr_in).sin_addr.s_addr = ++ ((struct in_addr *)hostinfo->h_addr)->s_addr; ++ } else { ++ err = errorNumber; ++ throw SocketException("unable to resolve host by name", err); ++ } ++ } ++#endif ++ sock = socket (family, SOCK_STREAM, 0); ++ if (sock == -1) { ++ err = errorNumber; ++#ifdef HAVE_GETADDRINFO ++ freeaddrinfo(ai); ++#endif ++ throw SocketException("unable to create socket", err); + } +- } + +- // Attempt to connect to the remote host +- for (;;) { +- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { +- int e = errorNumber; +- if (e == EINTR) +- continue; ++ // Attempt to connect to the remote host ++ while ((result = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) { ++ err = errorNumber; ++ if (err == EINTR) ++ continue; + closesocket(sock); +- throw SocketException("unable to connect to host", e); +- } else break; ++ break; ++ } ++#ifdef HAVE_GETADDRINFO ++ if (result == 0) ++ break; ++ else ++ continue; + } + ++ freeaddrinfo(ai); ++#endif ++ if (result == -1) ++ throw SocketException("unable connect to socket", err); ++ ++#ifndef WIN32 ++ // - By default, close the socket on exec() ++ fcntl(sock, F_SETFD, FD_CLOEXEC); ++#endif ++ + // Disable Nagle's algorithm, to reduce latency + enableNagles(sock, false); + +diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.cxx +--- vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 2008-06-02 10:23:35.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/rdr/Exception.cxx 2008-06-02 10:28:51.000000000 +0200 +@@ -22,8 +22,23 @@ + #include + #endif + ++#include ++ + using namespace rdr; + ++Exception::Exception(const char *format, ...) { ++ va_list ap; ++ int result; ++ ++ va_start(ap, format); ++ result = vsnprintf(str_, len, format, ap); ++ va_end(ap); ++ ++ /* XXX - ensure that string ends correctly */ ++ if (result > len) ++ str_[len - 1] = '\0'; ++} ++ + SystemException::SystemException(const char* s, int err_) + : Exception(s), err(err_) + { +diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.h +--- vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 2008-06-02 10:23:05.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/rdr/Exception.h 2008-06-02 10:28:41.000000000 +0200 +@@ -27,13 +27,7 @@ namespace rdr { + struct Exception { + enum { len = 256 }; + char str_[len]; +- Exception(const char* s=0) { +- str_[0] = 0; +- if (s) +- strncat(str_, s, len-1); +- else +- strcat(str_, "Exception"); +- } ++ Exception(const char *format, ...); + virtual const char* str() const { return str_; } + }; + diff --git a/vnc.spec b/vnc.spec index c22ad19..f753e78 100644 --- a/vnc.spec +++ b/vnc.spec @@ -1,9 +1,10 @@ -%define vnc_version 4_1_2 +%define vnc_version 4_1_3 +%define _default_patch_fuzz 2 Summary: A remote display system Name: vnc -Version: 4.1.2 -Release: 29%{?dist} +Version: 4.1.3 +Release: 1%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -25,7 +26,6 @@ Patch15: vnc-viewer-reparent.patch Patch16: vnc-64bit.patch Patch17: vnc-select.patch Patch21: vnc-newfbsize.patch -Patch23: vnc-210617.patch Patch24: vnc-102434.patch Patch25: vnc-config.patch Patch28: vnc-render.patch @@ -39,7 +39,6 @@ Patch40: vnc-xorg.patch Patch41: vnc-privates.patch Patch42: vnc-mieq.patch Patch43: vnc-allocate.patch -Patch44: vnc-noxkb.patch Patch45: vnc-paint.patch Patch46: vnc-selections.patch Patch48: vnc-manminor.patch @@ -47,6 +46,7 @@ Patch49: vnc-clipboard.patch Patch50: vnc-scrollbars.patch Patch51: vnc-bounds.patch Patch52: vnc-includes.patch +Patch53: vnc-viewerIPv6.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -62,7 +62,7 @@ BuildRequires: libXtst-devel, xorg-x11-util-macros BuildRequires: libXt-devel, libXv-devel, pixman-devel BuildRequires: libselinux-devel BuildRequires: xorg-x11-server-source -BuildRequires: mesa-libGL-devel >= 6.5.2, mesa-source >= 6.5.2, libdrm-devel +BuildRequires: mesa-libGL-devel >= 6.5.2, libdrm-devel Requires: gtk2 >= 2.6 Requires: coreutils @@ -115,7 +115,6 @@ popd %patch16 -p1 -b .64bit %patch17 -p1 -b .select %patch21 -p1 -b .newfbsize -%patch23 -p1 -b .ipv6 %patch24 -p1 -b .102434 %patch25 -p1 -b .config %patch28 -p1 -b .render @@ -136,7 +135,6 @@ pushd unix/xorg-x11-server-source/hw/vnc popd %patch42 -p1 -b .mieq %patch43 -p1 -b .alloc -%patch44 -p1 -b .noxkb %patch45 -p1 -b .paint %patch46 -p1 -b .selections %patch48 -p1 -b .minor @@ -144,6 +142,7 @@ popd %patch50 -p1 -b .scrollbars %patch51 -p1 -b .bounds %patch52 -p1 -b .includes +%patch53 -p1 -b .ipv6 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" @@ -171,7 +170,7 @@ autoreconf -fiv --disable-xprint \ --disable-static \ --disable-composite \ - --enable-xtrap \ + --disable-xtrap \ --enable-xcsecurity \ --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ --with-fontdir=%{_datadir}/X11/fonts \ @@ -181,11 +180,10 @@ autoreconf -fiv --with-rgb-path=%{_datadir}/X11/rgb \ --enable-install-libxf86config \ --disable-xevie \ - --disable-dri \ - --enable-glx \ + --enable-glx \ --disable-config-dbus \ --disable-config-hal \ - --with-mesa-source=%{_datadir}/mesa/source + --with-dri-driver-path=%{_libdir}/dri make %{?_smp_mflags} popd @@ -334,6 +332,19 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Jan 26 2009 Adam Tkac 4.1.3-1 +- updated to 4.1.3 (CVE-2008-4770) + +* Wed Nov 12 2008 Adam Tkac 4.1.2-32 +- minor correction in configure flags to make GLX working (#471166) + +* Mon Jun 30 2008 Adam Tkac 4.1.2-31 +- enabled XKEYBOARD extension (#450033) +- improved IPv6 support in viewer (#438422) + +* Fri Apr 25 2008 Adam Tkac 4.1.2-30 +- rebuild against new mesa to fix GLX under anaconda (#443635) + * Wed Apr 09 2008 Adam Tkac 4.1.2-29 - rebuild with -O2