parent
0c8fd29b3e
commit
0cb767b5d8
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/LibVNCServer-0.9.11.tar.gz
|
||||
/LibVNCServer-0.9.12.tar.gz
|
||||
/LibVNCServer-0.9.13.tar.gz
|
||||
/LibVNCServer-0.9.14.tar.gz
|
||||
|
||||
@ -196,7 +196,7 @@ diff --git a/rfb/rfb.h b/rfb/rfb.h
|
||||
index 5e9ba86f..3c0b25a3 100644
|
||||
--- a/rfb/rfb.h
|
||||
+++ b/rfb/rfb.h
|
||||
@@ -387,6 +387,14 @@ typedef struct sraRegion* sraRegionPtr;
|
||||
@@ -398,6 +398,14 @@ typedef struct sraRegion* sraRegionPtr;
|
||||
typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl);
|
||||
typedef void (*ClientFramebufferUpdateRequestHookPtr)(struct _rfbClientRec* cl, rfbFramebufferUpdateRequestMsg* furMsg);
|
||||
|
||||
@ -211,10 +211,10 @@ index 5e9ba86f..3c0b25a3 100644
|
||||
typedef struct _rfbFileTransferData {
|
||||
int fd;
|
||||
int compressionEnabled;
|
||||
@@ -680,6 +688,11 @@ typedef struct _rfbClientRec {
|
||||
rfbBool useExtDesktopSize;
|
||||
int requestedDesktopSizeChange;
|
||||
int lastDesktopSizeChangeError;
|
||||
@@ -707,6 +715,11 @@ typedef struct _rfbClientRec {
|
||||
int tightPngDstDataLen;
|
||||
#endif
|
||||
#endif
|
||||
+
|
||||
+ ClientReadFromSocket readFromSocket; /* Read data from socket */
|
||||
+ ClientPeekAtSocket peekAtSocket; /* Peek at data from socket */
|
||||
@ -223,7 +223,7 @@ index 5e9ba86f..3c0b25a3 100644
|
||||
} rfbClientRec, *rfbClientPtr;
|
||||
|
||||
/**
|
||||
@@ -732,8 +745,12 @@ extern void rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen);
|
||||
@@ -759,8 +772,12 @@ extern void rfbDisconnectUDPSock(rfbScre
|
||||
extern void rfbCloseClient(rfbClientPtr cl);
|
||||
extern int rfbReadExact(rfbClientPtr cl, char *buf, int len);
|
||||
extern int rfbReadExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout);
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From d138cf90130b0e8d5062f136ecdbcaa85e734d5d Mon Sep 17 00:00:00 2001
|
||||
From: Christian Beier <info@christianbeier.net>
|
||||
Date: Mon, 20 Jul 2020 22:33:29 +0200
|
||||
Subject: [PATCH] libvncserver: don't NULL out internal of the default cursor
|
||||
|
||||
...otherwise an rfbScreen created after rfbScreenCleanup() was called
|
||||
gets assigned an invalid cursor struct.
|
||||
---
|
||||
libvncserver/main.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libvncserver/main.c b/libvncserver/main.c
|
||||
index 9149fda3..a3a711e3 100644
|
||||
--- a/libvncserver/main.c
|
||||
+++ b/libvncserver/main.c
|
||||
@@ -1110,7 +1110,8 @@ void rfbScreenCleanup(rfbScreenInfoPtr screen)
|
||||
FREE_IF(underCursorBuffer);
|
||||
TINI_MUTEX(screen->cursorMutex);
|
||||
|
||||
- rfbFreeCursor(screen->cursor);
|
||||
+ if(screen->cursor != &myCursor)
|
||||
+ rfbFreeCursor(screen->cursor);
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
rfbZlibCleanup(screen);
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@ -176,7 +176,7 @@ index 814a8142..55e0b3c9 100644
|
||||
{
|
||||
/* The size of the message is the count of security types +1,
|
||||
* since the first byte is the number of types. */
|
||||
@@ -207,9 +258,10 @@ rfbSendSecurityTypeList(rfbClientPtr cl, int primaryType)
|
||||
@@ -207,9 +207,10 @@ rfbSendSecurityTypeList(rfbClientPtr cl,
|
||||
rfbSecurityHandler* handler;
|
||||
#define MAX_SECURITY_TYPES 255
|
||||
uint8_t buffer[MAX_SECURITY_TYPES+1];
|
||||
@ -187,7 +187,7 @@ index 814a8142..55e0b3c9 100644
|
||||
+ primaryType = determinePrimarySecurityType(cl);
|
||||
switch (primaryType) {
|
||||
case rfbSecTypeNone:
|
||||
rfbRegisterSecurityHandler(&VncSecurityHandlerNone);
|
||||
rfbUnregisterSecurityHandler(&VncSecurityHandlerVncAuth);
|
||||
@@ -221,6 +273,9 @@ rfbSendSecurityTypeList(rfbClientPtr cl, int primaryType)
|
||||
|
||||
for (handler = securityHandlers;
|
||||
@ -342,17 +342,15 @@ index 3c0b25a3..d136f884 100644
|
||||
RFB_AUTHENTICATION, /**< authenticating */
|
||||
RFB_INITIALISATION, /**< sending initialisation messages */
|
||||
RFB_NORMAL, /**< normal protocol messages */
|
||||
@@ -488,7 +494,9 @@ typedef struct _rfbClientRec {
|
||||
/* Ephemeral internal-use states that will never be seen by software
|
||||
@@ -500,6 +506,8 @@ typedef struct _rfbClientRec {
|
||||
* using LibVNCServer to provide services: */
|
||||
|
||||
- RFB_INITIALISATION_SHARED /**< sending initialisation messages with implicit shared-flag already true */
|
||||
+ RFB_INITIALISATION_SHARED, /**< sending initialisation messages with implicit shared-flag already true */
|
||||
RFB_INITIALISATION_SHARED, /**< sending initialisation messages with implicit shared-flag already true */
|
||||
+
|
||||
+ RFB_CHANNEL_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
|
||||
RFB_SHUTDOWN /**< Client is shutting down */
|
||||
} state;
|
||||
|
||||
rfbBool reverseConnection;
|
||||
@@ -840,6 +848,9 @@ extern void rfbProcessClientSecurityType(rfbClientPtr cl);
|
||||
extern void rfbAuthProcessClientMessage(rfbClientPtr cl);
|
||||
extern void rfbRegisterSecurityHandler(rfbSecurityHandler* handler);
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 2a77dd86a97fa5f4735f678599cea839ba09009c Mon Sep 17 00:00:00 2001
|
||||
From: Christian Beier <info@christianbeier.net>
|
||||
Date: Sun, 9 Aug 2020 20:11:26 +0200
|
||||
Subject: [PATCH 3/4] libvncserver/auth: don't keep security handlers from
|
||||
previous runs
|
||||
|
||||
Whyohsoever security handlers are stored in a variable global to the
|
||||
application, not in the rfbScreen struct. This meant that security
|
||||
handlers registered once would stick around forever before this commit.
|
||||
---
|
||||
libvncserver/auth.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libvncserver/auth.c b/libvncserver/auth.c
|
||||
index 55e0b3c9..fc74c800 100644
|
||||
--- a/libvncserver/auth.c
|
||||
+++ b/libvncserver/auth.c
|
||||
@@ -264,9 +264,11 @@ rfbSendSecurityTypeList(rfbClientPtr cl,
|
||||
primaryType = determinePrimarySecurityType(cl);
|
||||
switch (primaryType) {
|
||||
case rfbSecTypeNone:
|
||||
+ rfbUnregisterSecurityHandler(&VncSecurityHandlerVncAuth);
|
||||
rfbRegisterSecurityHandler(&VncSecurityHandlerNone);
|
||||
break;
|
||||
case rfbSecTypeVncAuth:
|
||||
+ rfbUnregisterSecurityHandler(&VncSecurityHandlerNone);
|
||||
rfbRegisterSecurityHandler(&VncSecurityHandlerVncAuth);
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From 641610b961a732bb68f111536ebf8c42be20f05b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 16 Sep 2020 17:35:49 +0200
|
||||
Subject: [PATCH 4/4] zlib: Clear buffer pointers on cleanup (#444)
|
||||
|
||||
The pointers to the buffers were freed, and the size fields were set to
|
||||
0, but the buffer pointers themsef was not set to NULL, when shutting
|
||||
down, meaning the next time used, NULL checks would not tell whether the
|
||||
pointer is valid. This caused crashes ending with
|
||||
|
||||
#0 0x00007ffff73729e5 in raise () from /lib64/libc.so.6
|
||||
#1 0x00007ffff735b895 in abort () from /lib64/libc.so.6
|
||||
#2 0x00007ffff73b6857 in __libc_message () from /lib64/libc.so.6
|
||||
#3 0x00007ffff73bdd7c in malloc_printerr () from /lib64/libc.so.6
|
||||
#4 0x00007ffff73c2f1a in realloc () from /lib64/libc.so.6
|
||||
#5 0x00007ffff78b558e in rfbSendOneRectEncodingZlib (cl=0x4a4b80, x=0, y=0, w=800, h=40) at /home/jonas/Dev/gnome/libvncserver/libvncserver/zlib.c:106
|
||||
#6 0x00007ffff78b5dec in rfbSendRectEncodingZlib (cl=0x4a4b80, x=0, y=0, w=800, h=600) at /home/jonas/Dev/gnome/libvncserver/libvncserver/zlib.c:308
|
||||
#7 0x00007ffff7899453 in rfbSendFramebufferUpdate (cl=0x4a4b80, givenUpdateRegion=0x49ef70) at /home/jonas/Dev/gnome/libvncserver/libvncserver/rfbserver.c:3264
|
||||
#8 0x00007ffff789079d in rfbUpdateClient (cl=0x4a4b80) at /home/jonas/Dev/gnome/libvncserver/libvncserver/main.c:1275
|
||||
#9 0x00007ffff78905f5 in rfbProcessEvents (screen=0x4d5790, usec=0) at /home/jonas/Dev/gnome/libvncserver/libvncserver/main.c:1251
|
||||
---
|
||||
libvncserver/zlib.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libvncserver/zlib.c b/libvncserver/zlib.c
|
||||
index d24d7d15..5c3a8236 100644
|
||||
--- a/libvncserver/zlib.c
|
||||
+++ b/libvncserver/zlib.c
|
||||
@@ -64,11 +64,13 @@ void rfbZlibCleanup(rfbScreenInfoPtr screen)
|
||||
{
|
||||
if (zlibBeforeBufSize) {
|
||||
free(zlibBeforeBuf);
|
||||
+ zlibBeforeBuf = NULL;
|
||||
zlibBeforeBufSize=0;
|
||||
}
|
||||
if (zlibAfterBufSize) {
|
||||
zlibAfterBufSize=0;
|
||||
free(zlibAfterBuf);
|
||||
+ zlibAfterBuf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
||||
10
ffmpeg.patch
Normal file
10
ffmpeg.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- ./CMakeLists.txt.orig 2023-11-17 00:42:59.088325120 +0000
|
||||
+++ ./CMakeLists.txt 2023-11-17 00:44:57.007106061 +0000
|
||||
@@ -619,6 +619,7 @@ if(NOT LIBSSH2_FOUND)
|
||||
endif()
|
||||
|
||||
if(FFMPEG_FOUND)
|
||||
+ include_directories(${FFMPEG_INCLUDE_DIRS})
|
||||
set(LIBVNCCLIENT_EXAMPLES
|
||||
${LIBVNCCLIENT_EXAMPLES}
|
||||
vnc2mpg
|
||||
@ -1,15 +1,13 @@
|
||||
diff -up libvncserver-LibVNCServer-0.9.13/libvncclient/tls_gnutls.c.crypto_policy libvncserver-LibVNCServer-0.9.13/libvncclient/tls_gnutls.c
|
||||
--- libvncserver-LibVNCServer-0.9.13/libvncclient/tls_gnutls.c.crypto_policy 2020-06-13 13:49:53.000000000 -0500
|
||||
+++ libvncserver-LibVNCServer-0.9.13/libvncclient/tls_gnutls.c 2020-07-02 08:00:54.304902893 -0500
|
||||
@@ -29,8 +29,8 @@
|
||||
--- ./libvncclient/tls_gnutls.c.crypto_policy 2023-11-15 13:20:04.136352789 +0000
|
||||
+++ ./libvncclient/tls_gnutls.c 2023-11-15 13:21:40.971072818 +0000
|
||||
@@ -25,8 +25,8 @@
|
||||
#include "tls.h"
|
||||
|
||||
|
||||
-static const char *rfbTLSPriority = "NORMAL:+DHE-DSS:+RSA:+DHE-RSA:+SRP";
|
||||
-static const char *rfbAnonTLSPriority= "NORMAL:+ANON-DH";
|
||||
-static const char *rfbAnonTLSPriority = "NORMAL:+ANON-ECDH:+ANON-DH";
|
||||
+static const char *rfbTLSPriority = "@SYSTEM";
|
||||
+static const char *rfbAnonTLSPriority= "@SYSTEM:+ANON-DH";
|
||||
|
||||
#define DH_BITS 1024
|
||||
static gnutls_dh_params_t rfbDHParams;
|
||||
diff -up libvncserver-LibVNCServer-0.9.13/libvncserver/rfbssl_gnutls.c.crypto_policy libvncserver-LibVNCServer-0.9.13/libvncserver/rfbssl_gnutls.c
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
Summary: Library to make writing a VNC server easy
|
||||
Name: libvncserver
|
||||
Version: 0.9.13
|
||||
Release: 15%{?dist}
|
||||
Version: 0.9.14
|
||||
Release: 1%{?dist}
|
||||
|
||||
# NOTE: --with-filetransfer => GPLv2
|
||||
License: GPL-2.0-or-later
|
||||
@ -14,22 +14,13 @@ Source0: https://github.com/LibVNC/libvncserver/archive/LibVNCServer-%{versio
|
||||
# https://github.com/LibVNC/libvncserver/pull/234
|
||||
Patch10: 0001-libvncserver-Add-API-to-add-custom-I-O-entry-points.patch
|
||||
Patch11: 0002-libvncserver-Add-channel-security-handlers.patch
|
||||
# https://github.com/LibVNC/libvncserver/commit/87c52ee0551b7c4e76855d270d475b9e3039fe08
|
||||
Patch12: 0003-libvncserver-auth-don-t-keep-security-handlers-from-.patch
|
||||
# Fix crash on all runs after the first
|
||||
# https://github.com/LibVNC/libvncserver/pull/444
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1882718
|
||||
Patch13: 0004-zlib-Clear-buffer-pointers-on-cleanup-444.patch
|
||||
# Fix another crasher
|
||||
# https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/45
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1882718
|
||||
Patch14: 0001-libvncserver-don-t-NULL-out-internal-of-the-default-.patch
|
||||
Patch12: ffmpeg.patch
|
||||
|
||||
## downstream patches
|
||||
Patch102: libvncserver-LibVNCServer-0.9.13-system-crypto-policy.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake3
|
||||
BuildRequires: cmake
|
||||
BuildRequires: pkgconfig(gnutls)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
@ -45,11 +36,12 @@ BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
#BuildRequires: pkgconfig(lzo2)
|
||||
#BuildRequires: ffmpeg-devel
|
||||
BuildRequires: pkgconfig(libavformat)
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libavutil)
|
||||
BuildRequires: pkgconfig(libswscale)
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
|
||||
|
||||
BuildRequires: lzo-devel
|
||||
BuildRequires: lzo-minilzo
|
||||
BuildRequires: pkgconfig(libcrypto)
|
||||
@ -93,17 +85,30 @@ developing applications that use %{name}.
|
||||
%prep
|
||||
%setup -q -n %{name}-LibVNCServer-%{version}
|
||||
|
||||
%patch10 -p1 -b .tls-1
|
||||
%patch11 -p1 -b .tls-2
|
||||
%patch12 -p1 -b .handlers
|
||||
%patch13 -p1 -b .pointers
|
||||
%patch14 -p1 -b .cursor_null
|
||||
|
||||
%patch102 -p1 -b .crypto_policy
|
||||
%patch -P10 -p1 -b .tls-1
|
||||
%patch -P11 -p1 -b .tls-2
|
||||
%patch -P12 -p1 -b .include_ffmpeg
|
||||
%patch -P102 -p1 -b .crypto_policy
|
||||
|
||||
# Nuke bundled minilzo
|
||||
rm -fv common/lzodefs.h common/lzoconf.h commmon/minilzo.h common/minilzo.c
|
||||
|
||||
#rm common/base64.c
|
||||
#rm common/base64.h
|
||||
#rm common/crypto.h
|
||||
#rm common/crypto_included.c
|
||||
#rm common/crypto_libgcrypt.c
|
||||
rm common/crypto_openssl.c
|
||||
rm common/d3des.c
|
||||
rm common/d3des.h
|
||||
rm common/minilzo.h
|
||||
rm common/sha1.c
|
||||
rm common/sha.h
|
||||
rm common/sha-private.h
|
||||
#rm common/sockets.c
|
||||
#rm common/sockets.h
|
||||
#rm common/turbojpeg.c
|
||||
#rm common/turbojpeg.h
|
||||
#rm common/vncauth.c
|
||||
#rm common/zywrletemplate.c
|
||||
|
||||
# Fix encoding
|
||||
for file in ChangeLog ; do
|
||||
@ -114,7 +119,7 @@ done
|
||||
|
||||
|
||||
%build
|
||||
%cmake3
|
||||
%cmake
|
||||
|
||||
%cmake_build
|
||||
|
||||
@ -123,11 +128,9 @@ done
|
||||
%cmake_install
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc AUTHORS ChangeLog NEWS* README* TODO*
|
||||
%doc AUTHORS ChangeLog NEWS* README* CONTRIBUTING.md HISTORY.md SECURITY.md
|
||||
%{_libdir}/libvncclient.so.1
|
||||
%{_libdir}/libvncclient.so.%{version}
|
||||
%{_libdir}/libvncserver.so.1
|
||||
@ -140,9 +143,14 @@ done
|
||||
%{_libdir}/libvncserver.so
|
||||
%{_libdir}/pkgconfig/libvncclient.pc
|
||||
%{_libdir}/pkgconfig/libvncserver.pc
|
||||
%{_libdir}/cmake/LibVNCServer/*.cmake
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Nov 15 2023 Sérgio Basto <sergio@serjux.com> - 0.9.14-1
|
||||
- Update to 0.9.14 (#2155072)
|
||||
- Enable ffmpeg
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (LibVNCServer-0.9.13.tar.gz) = 18b0a1698d32bbdbfe6f65f76130b2a95860e3cc76e8adb904269663698c7c0ae982f451fda1f25e5461f096045d40a89d9014258f439366d5b4feaa4999d643
|
||||
SHA512 (LibVNCServer-0.9.14.tar.gz) = 8a0a58e355154cbe1e5807864dc874b063c5e5f5e20d64ae541d49d51b654a35ca9c625adc5c303b6570fa79c19f82d87a37612f9801b453ccf862bd77c06fcc
|
||||
|
||||
Loading…
Reference in New Issue
Block a user