Compare commits
3 Commits
Author | SHA256 | Date | |
---|---|---|---|
a014ea3d0d | |||
d8f52ad15d | |||
94d47b9540 |
25
0001-CMake-require-at-least-CMake-3.5.patch
Normal file
25
0001-CMake-require-at-least-CMake-3.5.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From e64fa928170f22a2e21b5bbd6d46c8f8e7dd7a96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= <matti.lehtimaki@jolla.com>
|
||||
Date: Tue, 13 May 2025 08:37:07 +0300
|
||||
Subject: [PATCH] CMake: require at least CMake 3.5
|
||||
|
||||
CMake 4 dropped support for version requirements < 3.5.
|
||||
|
||||
Fixes building with CMake >= 4.
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 205f3928..9b8118c8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.4)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
set(PROJECT_LANGUAGES C)
|
||||
|
||||
--
|
||||
2.50.0
|
||||
|
@@ -1,22 +1,66 @@
|
||||
From e4849b01fec4494057728d1aa3a165ed21705682 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 11 Jun 2018 23:47:02 +0200
|
||||
Subject: [PATCH 1/4] libvncserver: Add API to add custom I/O entry points
|
||||
Subject: [PATCH] libvncserver: Add API to add custom I/O entry points
|
||||
|
||||
Add API to make it possible to channel RFB input and output through
|
||||
another layer, for example TLS. This is done by making it possible to
|
||||
override the default read/write/peek functions.
|
||||
---
|
||||
libvncserver/rfbserver.c | 4 ++
|
||||
libvncserver/sockets.c | 79 ++++++++++++++++++++++++++++++++++++----
|
||||
rfb/rfb.h | 17 +++++++++
|
||||
include/rfb/rfb.h | 17 ++++++++
|
||||
src/libvncserver/rfbserver.c | 4 ++
|
||||
src/libvncserver/sockets.c | 79 ++++++++++++++++++++++++++++++++----
|
||||
3 files changed, 93 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: libvncserver-LibVNCServer-0.9.14/libvncserver/rfbserver.c
|
||||
===================================================================
|
||||
--- libvncserver-LibVNCServer-0.9.14.orig/libvncserver/rfbserver.c
|
||||
+++ libvncserver-LibVNCServer-0.9.14/libvncserver/rfbserver.c
|
||||
@@ -321,6 +321,10 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rf
|
||||
diff --git a/include/rfb/rfb.h b/include/rfb/rfb.h
|
||||
index 50acf24..204fa05 100644
|
||||
--- a/include/rfb/rfb.h
|
||||
+++ b/include/rfb/rfb.h
|
||||
@@ -402,6 +402,14 @@ typedef struct sraRegion* sraRegionPtr;
|
||||
typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl);
|
||||
typedef void (*ClientFramebufferUpdateRequestHookPtr)(struct _rfbClientRec* cl, rfbFramebufferUpdateRequestMsg* furMsg);
|
||||
|
||||
+typedef int (*ClientReadFromSocket)(struct _rfbClientRec* cl,
|
||||
+ char *buf, int len);
|
||||
+typedef int (*ClientPeekAtSocket)(struct _rfbClientRec* cl,
|
||||
+ char *buf, int len);
|
||||
+typedef rfbBool (*ClientHasPendingOnSocket)(struct _rfbClientRec* cl);
|
||||
+typedef int (*ClientWriteToSocket)(struct _rfbClientRec* cl,
|
||||
+ const char *buf, int len);
|
||||
+
|
||||
typedef struct _rfbFileTransferData {
|
||||
int fd;
|
||||
int compressionEnabled;
|
||||
@@ -711,6 +719,11 @@ typedef struct _rfbClientRec {
|
||||
int tightPngDstDataLen;
|
||||
#endif
|
||||
#endif
|
||||
+
|
||||
+ ClientReadFromSocket readFromSocket; /* Read data from socket */
|
||||
+ ClientPeekAtSocket peekAtSocket; /* Peek at data from socket */
|
||||
+ ClientHasPendingOnSocket hasPendingOnSocket; /* Peek at data from socket */
|
||||
+ ClientWriteToSocket writeToSocket; /* Write data to socket */
|
||||
} rfbClientRec, *rfbClientPtr;
|
||||
|
||||
/**
|
||||
@@ -763,8 +776,12 @@ extern void rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen);
|
||||
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);
|
||||
+extern int rfbDefaultReadFromSocket(rfbClientPtr cl, char *buf, int len);
|
||||
extern int rfbPeekExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout);
|
||||
+extern int rfbDefaultPeekAtSocket(rfbClientPtr cl, char *buf, int len);
|
||||
+extern rfbBool rfbDefaultHasPendingOnSocket(rfbClientPtr cl);
|
||||
extern int rfbWriteExact(rfbClientPtr cl, const char *buf, int len);
|
||||
+extern int rfbDefaultWriteToSocket(rfbClientPtr cl, const char *buf, int len);
|
||||
extern int rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec);
|
||||
extern rfbSocket rfbConnect(rfbScreenInfoPtr rfbScreen, char* host, int port);
|
||||
extern rfbSocket rfbConnectToTcpAddr(char* host, int port);
|
||||
diff --git a/src/libvncserver/rfbserver.c b/src/libvncserver/rfbserver.c
|
||||
index 8e3c3f6..2385dba 100644
|
||||
--- a/src/libvncserver/rfbserver.c
|
||||
+++ b/src/libvncserver/rfbserver.c
|
||||
@@ -321,6 +321,10 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
|
||||
|
||||
cl->screen = rfbScreen;
|
||||
cl->sock = sock;
|
||||
@@ -27,21 +71,21 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/rfbserver.c
|
||||
cl->viewOnly = FALSE;
|
||||
/* setup pseudo scaling */
|
||||
cl->scaledScreen = rfbScreen;
|
||||
Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
===================================================================
|
||||
--- libvncserver-LibVNCServer-0.9.14.orig/libvncserver/sockets.c
|
||||
+++ libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
@@ -102,6 +102,9 @@ int rfbMaxClientWait = 20000; /* time
|
||||
diff --git a/src/libvncserver/sockets.c b/src/libvncserver/sockets.c
|
||||
index c18493c..51cc86b 100644
|
||||
--- a/src/libvncserver/sockets.c
|
||||
+++ b/src/libvncserver/sockets.c
|
||||
@@ -101,6 +101,9 @@ int deny_severity=LOG_WARNING;
|
||||
int rfbMaxClientWait = 20000; /* time (ms) after which we decide client has
|
||||
gone away - needed to stop us hanging */
|
||||
|
||||
static rfbBool
|
||||
+static rfbBool
|
||||
+rfbHasPendingOnSocket(rfbClientPtr cl);
|
||||
+
|
||||
+static rfbBool
|
||||
static rfbBool
|
||||
rfbNewConnectionFromSock(rfbScreenInfoPtr rfbScreen, rfbSocket sock)
|
||||
{
|
||||
const int one = 1;
|
||||
@@ -364,16 +367,20 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,l
|
||||
@@ -364,16 +367,20 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
|
||||
tv.tv_usec = usec;
|
||||
nfds = select(rfbScreen->maxFd + 1, &fds, NULL, NULL /* &fds */, &tv);
|
||||
if (nfds == 0) {
|
||||
@@ -63,7 +107,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
}
|
||||
|
||||
if (nfds < 0) {
|
||||
@@ -449,9 +456,11 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,l
|
||||
@@ -449,9 +456,11 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
|
||||
if (cl->onHold)
|
||||
continue;
|
||||
|
||||
@@ -77,9 +121,9 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
{
|
||||
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
|
||||
do {
|
||||
@@ -638,6 +647,30 @@ rfbConnect(rfbScreenInfoPtr rfbScreen,
|
||||
return sock;
|
||||
}
|
||||
@@ -649,6 +658,30 @@ size_t fuzz_size;
|
||||
const uint8_t *fuzz_data;
|
||||
#endif
|
||||
|
||||
+int
|
||||
+rfbDefaultReadFromSocket(rfbClientPtr cl, char *buf, int len)
|
||||
@@ -108,7 +152,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
/*
|
||||
* ReadExact reads an exact number of bytes from a client. Returns 1 if
|
||||
* those bytes have been read, 0 if the other end has closed, or -1 if an error
|
||||
@@ -659,10 +692,10 @@ rfbReadExactTimeout(rfbClientPtr cl, cha
|
||||
@@ -678,10 +711,10 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
|
||||
} else if (cl->sslctx) {
|
||||
n = rfbssl_read(cl, buf, len);
|
||||
} else {
|
||||
@@ -121,7 +165,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
#endif
|
||||
|
||||
if (n > 0) {
|
||||
@@ -694,6 +727,10 @@ rfbReadExactTimeout(rfbClientPtr cl, cha
|
||||
@@ -713,6 +746,10 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
@@ -132,7 +176,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(sock, &fds);
|
||||
tv.tv_sec = timeout / 1000;
|
||||
@@ -730,6 +767,18 @@ int rfbReadExact(rfbClientPtr cl,char* b
|
||||
@@ -749,6 +786,18 @@ int rfbReadExact(rfbClientPtr cl,char* buf,int len)
|
||||
return(rfbReadExactTimeout(cl,buf,len,rfbMaxClientWait));
|
||||
}
|
||||
|
||||
@@ -151,7 +195,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
/*
|
||||
* PeekExact peeks at an exact number of bytes from a client. Returns 1 if
|
||||
* those bytes have been read, 0 if the other end has closed, or -1 if an
|
||||
@@ -750,7 +799,7 @@ rfbPeekExactTimeout(rfbClientPtr cl, cha
|
||||
@@ -777,7 +826,7 @@ rfbPeekExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
|
||||
n = rfbssl_peek(cl, buf, len);
|
||||
else
|
||||
#endif
|
||||
@@ -160,7 +204,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
|
||||
if (n == len) {
|
||||
|
||||
@@ -806,6 +855,22 @@ rfbPeekExactTimeout(rfbClientPtr cl, cha
|
||||
@@ -833,6 +882,22 @@ rfbPeekExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -183,7 +227,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
/*
|
||||
* WriteExact writes an exact number of bytes to a client. Returns 1 if
|
||||
* those bytes have been written, or -1 if an error occurred (errno is set to
|
||||
@@ -863,7 +928,7 @@ rfbWriteExact(rfbClientPtr cl,
|
||||
@@ -893,7 +958,7 @@ rfbWriteExact(rfbClientPtr cl,
|
||||
n = rfbssl_write(cl, buf, len);
|
||||
else
|
||||
#endif
|
||||
@@ -192,47 +236,6 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/sockets.c
|
||||
|
||||
if (n > 0) {
|
||||
|
||||
Index: libvncserver-LibVNCServer-0.9.14/rfb/rfb.h
|
||||
===================================================================
|
||||
--- libvncserver-LibVNCServer-0.9.14.orig/rfb/rfb.h
|
||||
+++ libvncserver-LibVNCServer-0.9.14/rfb/rfb.h
|
||||
@@ -398,6 +398,14 @@ typedef struct sraRegion* sraRegionPtr;
|
||||
typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl);
|
||||
typedef void (*ClientFramebufferUpdateRequestHookPtr)(struct _rfbClientRec* cl, rfbFramebufferUpdateRequestMsg* furMsg);
|
||||
|
||||
+typedef int (*ClientReadFromSocket)(struct _rfbClientRec* cl,
|
||||
+ char *buf, int len);
|
||||
+typedef int (*ClientPeekAtSocket)(struct _rfbClientRec* cl,
|
||||
+ char *buf, int len);
|
||||
+typedef rfbBool (*ClientHasPendingOnSocket)(struct _rfbClientRec* cl);
|
||||
+typedef int (*ClientWriteToSocket)(struct _rfbClientRec* cl,
|
||||
+ const char *buf, int len);
|
||||
+
|
||||
typedef struct _rfbFileTransferData {
|
||||
int fd;
|
||||
int compressionEnabled;
|
||||
@@ -707,6 +715,11 @@ typedef struct _rfbClientRec {
|
||||
int tightPngDstDataLen;
|
||||
#endif
|
||||
#endif
|
||||
+
|
||||
+ ClientReadFromSocket readFromSocket; /* Read data from socket */
|
||||
+ ClientPeekAtSocket peekAtSocket; /* Peek at data from socket */
|
||||
+ ClientHasPendingOnSocket hasPendingOnSocket; /* Peek at data from socket */
|
||||
+ ClientWriteToSocket writeToSocket; /* Write data to socket */
|
||||
} rfbClientRec, *rfbClientPtr;
|
||||
|
||||
/**
|
||||
@@ -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);
|
||||
+extern int rfbDefaultReadFromSocket(rfbClientPtr cl, char *buf, int len);
|
||||
extern int rfbPeekExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout);
|
||||
+extern int rfbDefaultPeekAtSocket(rfbClientPtr cl, char *buf, int len);
|
||||
+extern rfbBool rfbDefaultHasPendingOnSocket(rfbClientPtr cl);
|
||||
extern int rfbWriteExact(rfbClientPtr cl, const char *buf, int len);
|
||||
+extern int rfbDefaultWriteToSocket(rfbClientPtr cl, const char *buf, int len);
|
||||
extern int rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec);
|
||||
extern rfbSocket rfbConnect(rfbScreenInfoPtr rfbScreen, char* host, int port);
|
||||
extern rfbSocket rfbConnectToTcpAddr(char* host, int port);
|
||||
--
|
||||
2.50.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From c9131a78878a785c3de21e9d49521d7b68400ad7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 11 Jun 2018 23:50:05 +0200
|
||||
Subject: [PATCH 2/4] libvncserver: Add channel security handlers
|
||||
Subject: [PATCH] libvncserver: Add channel security handlers
|
||||
|
||||
Add another type of security handler that is meant to be used initially
|
||||
to set up a secure channel. Regular security handlers would be
|
||||
@@ -13,16 +13,67 @@ done by adding a single channel security handler with the rfbTLS (18)
|
||||
with a handler that initiates a TLS session, and when a TLS session is
|
||||
initiated, the regular security handler list is sent.
|
||||
---
|
||||
libvncserver/auth.c | 164 ++++++++++++++++++++++++++++++---------
|
||||
libvncserver/rfbserver.c | 1 +
|
||||
rfb/rfb.h | 15 +++-
|
||||
3 files changed, 142 insertions(+), 38 deletions(-)
|
||||
include/rfb/rfb.h | 12 ++-
|
||||
src/libvncserver/auth.c | 164 +++++++++++++++++++++++++++--------
|
||||
src/libvncserver/rfbserver.c | 1 +
|
||||
3 files changed, 140 insertions(+), 37 deletions(-)
|
||||
|
||||
Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
===================================================================
|
||||
--- libvncserver-LibVNCServer-0.9.14.orig/libvncserver/auth.c
|
||||
+++ libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
@@ -37,18 +37,17 @@ void rfbClientSendString(rfbClientPtr cl
|
||||
diff --git a/include/rfb/rfb.h b/include/rfb/rfb.h
|
||||
index 204fa05..cac953c 100644
|
||||
--- a/include/rfb/rfb.h
|
||||
+++ b/include/rfb/rfb.h
|
||||
@@ -147,6 +147,11 @@ typedef struct {
|
||||
} data; /**< there have to be count*3 entries */
|
||||
} rfbColourMap;
|
||||
|
||||
+enum rfbSecurityTag {
|
||||
+ RFB_SECURITY_TAG_NONE = 0,
|
||||
+ RFB_SECURITY_TAG_CHANNEL = 1 << 0
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* Security handling (RFB protocol version 3.7)
|
||||
*/
|
||||
@@ -155,6 +160,7 @@ typedef struct _rfbSecurity {
|
||||
uint8_t type;
|
||||
void (*handler)(struct _rfbClientRec* cl);
|
||||
struct _rfbSecurity* next;
|
||||
+ enum rfbSecurityTag securityTags;
|
||||
} rfbSecurityHandler;
|
||||
|
||||
/**
|
||||
@@ -495,7 +501,7 @@ typedef struct _rfbClientRec {
|
||||
/** Possible client states: */
|
||||
enum {
|
||||
RFB_PROTOCOL_VERSION, /**< establishing protocol version */
|
||||
- RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
|
||||
+ RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
|
||||
RFB_AUTHENTICATION, /**< authenticating */
|
||||
RFB_INITIALISATION, /**< sending initialisation messages */
|
||||
RFB_NORMAL, /**< normal protocol messages */
|
||||
@@ -504,6 +510,7 @@ typedef struct _rfbClientRec {
|
||||
* using LibVNCServer to provide services: */
|
||||
|
||||
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;
|
||||
|
||||
@@ -874,6 +881,9 @@ extern void rfbProcessClientSecurityType(rfbClientPtr cl);
|
||||
extern void rfbAuthProcessClientMessage(rfbClientPtr cl);
|
||||
extern void rfbRegisterSecurityHandler(rfbSecurityHandler* handler);
|
||||
extern void rfbUnregisterSecurityHandler(rfbSecurityHandler* handler);
|
||||
+extern void rfbRegisterChannelSecurityHandler(rfbSecurityHandler* handler);
|
||||
+extern void rfbUnregisterChannelSecurityHandler(rfbSecurityHandler* handler);
|
||||
+extern void rfbSendSecurityTypeList(rfbClientPtr cl, enum rfbSecurityTag exclude);
|
||||
|
||||
/* rre.c */
|
||||
|
||||
diff --git a/src/libvncserver/auth.c b/src/libvncserver/auth.c
|
||||
index 748027b..fc74c80 100644
|
||||
--- a/src/libvncserver/auth.c
|
||||
+++ b/src/libvncserver/auth.c
|
||||
@@ -37,18 +37,17 @@ void rfbClientSendString(rfbClientPtr cl, const char *reason);
|
||||
* Handle security types
|
||||
*/
|
||||
|
||||
@@ -48,7 +99,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
|
||||
if(handler == NULL)
|
||||
return;
|
||||
@@ -57,39 +56,35 @@ rfbRegisterSecurityHandler(rfbSecurityHa
|
||||
@@ -57,39 +56,35 @@ rfbRegisterSecurityHandler(rfbSecurityHandler* handler)
|
||||
|
||||
while(head != NULL) {
|
||||
if(head == handler) {
|
||||
@@ -99,7 +150,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
|
||||
while(cur) {
|
||||
if(cur == handler) {
|
||||
@@ -99,7 +94,50 @@ rfbUnregisterSecurityHandler(rfbSecurity
|
||||
@@ -99,7 +94,50 @@ rfbUnregisterSecurityHandler(rfbSecurityHandler* handler)
|
||||
pre = cur;
|
||||
cur = cur->next;
|
||||
}
|
||||
@@ -151,7 +202,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -197,9 +235,22 @@ static rfbSecurityHandler VncSecurityHan
|
||||
@@ -197,9 +235,22 @@ static rfbSecurityHandler VncSecurityHandlerNone = {
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -176,7 +227,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
{
|
||||
/* 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,
|
||||
@@ -207,9 +258,10 @@ rfbSendSecurityTypeList(rfbClientPtr cl, int primaryType)
|
||||
rfbSecurityHandler* handler;
|
||||
#define MAX_SECURITY_TYPES 255
|
||||
uint8_t buffer[MAX_SECURITY_TYPES+1];
|
||||
@@ -188,7 +239,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
switch (primaryType) {
|
||||
case rfbSecTypeNone:
|
||||
rfbUnregisterSecurityHandler(&VncSecurityHandlerVncAuth);
|
||||
@@ -223,6 +275,9 @@ rfbSendSecurityTypeList(rfbClientPtr cl,
|
||||
@@ -223,6 +275,9 @@ rfbSendSecurityTypeList(rfbClientPtr cl, int primaryType)
|
||||
|
||||
for (handler = securityHandlers;
|
||||
handler && size<MAX_SECURITY_TYPES; handler = handler->next) {
|
||||
@@ -198,7 +249,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
buffer[size] = handler->type;
|
||||
size++;
|
||||
}
|
||||
@@ -251,7 +306,29 @@ rfbSendSecurityTypeList(rfbClientPtr cl,
|
||||
@@ -251,7 +306,29 @@ rfbSendSecurityTypeList(rfbClientPtr cl, int primaryType)
|
||||
cl->state = RFB_SECURITY_TYPE;
|
||||
}
|
||||
|
||||
@@ -228,7 +279,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
|
||||
|
||||
/*
|
||||
@@ -299,18 +376,19 @@ rfbSendSecurityType(rfbClientPtr cl, int
|
||||
@@ -299,18 +376,19 @@ rfbSendSecurityType(rfbClientPtr cl, int32_t securityType)
|
||||
void
|
||||
rfbAuthNewClient(rfbClientPtr cl)
|
||||
{
|
||||
@@ -270,7 +321,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,6 +416,7 @@ rfbProcessClientSecurityType(rfbClientPt
|
||||
@@ -334,6 +416,7 @@ rfbProcessClientSecurityType(rfbClientPtr cl)
|
||||
int n;
|
||||
uint8_t chosenType;
|
||||
rfbSecurityHandler* handler;
|
||||
@@ -278,7 +329,7 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
|
||||
/* Read the security type. */
|
||||
n = rfbReadExact(cl, (char *)&chosenType, 1);
|
||||
@@ -346,8 +429,17 @@ rfbProcessClientSecurityType(rfbClientPt
|
||||
@@ -346,8 +429,17 @@ rfbProcessClientSecurityType(rfbClientPtr cl)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -297,11 +348,11 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/auth.c
|
||||
if (chosenType == handler->type) {
|
||||
rfbLog("rfbProcessClientSecurityType: executing handler for type %d\n", chosenType);
|
||||
handler->handler(cl);
|
||||
Index: libvncserver-LibVNCServer-0.9.14/libvncserver/rfbserver.c
|
||||
===================================================================
|
||||
--- libvncserver-LibVNCServer-0.9.14.orig/libvncserver/rfbserver.c
|
||||
+++ libvncserver-LibVNCServer-0.9.14/libvncserver/rfbserver.c
|
||||
@@ -670,6 +670,7 @@ rfbProcessClientMessage(rfbClientPtr cl)
|
||||
diff --git a/src/libvncserver/rfbserver.c b/src/libvncserver/rfbserver.c
|
||||
index 2385dba..b2804ad 100644
|
||||
--- a/src/libvncserver/rfbserver.c
|
||||
+++ b/src/libvncserver/rfbserver.c
|
||||
@@ -679,6 +679,7 @@ rfbProcessClientMessage(rfbClientPtr cl)
|
||||
case RFB_PROTOCOL_VERSION:
|
||||
rfbProcessClientProtocolVersion(cl);
|
||||
return;
|
||||
@@ -309,54 +360,6 @@ Index: libvncserver-LibVNCServer-0.9.14/libvncserver/rfbserver.c
|
||||
case RFB_SECURITY_TYPE:
|
||||
rfbProcessClientSecurityType(cl);
|
||||
return;
|
||||
Index: libvncserver-LibVNCServer-0.9.14/rfb/rfb.h
|
||||
===================================================================
|
||||
--- libvncserver-LibVNCServer-0.9.14.orig/rfb/rfb.h
|
||||
+++ libvncserver-LibVNCServer-0.9.14/rfb/rfb.h
|
||||
@@ -147,6 +147,11 @@ typedef struct {
|
||||
} data; /**< there have to be count*3 entries */
|
||||
} rfbColourMap;
|
||||
|
||||
+enum rfbSecurityTag {
|
||||
+ RFB_SECURITY_TAG_NONE = 0,
|
||||
+ RFB_SECURITY_TAG_CHANNEL = 1 << 0
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* Security handling (RFB protocol version 3.7)
|
||||
*/
|
||||
@@ -155,6 +160,7 @@ typedef struct _rfbSecurity {
|
||||
uint8_t type;
|
||||
void (*handler)(struct _rfbClientRec* cl);
|
||||
struct _rfbSecurity* next;
|
||||
+ enum rfbSecurityTag securityTags;
|
||||
} rfbSecurityHandler;
|
||||
|
||||
/**
|
||||
@@ -491,7 +497,7 @@ typedef struct _rfbClientRec {
|
||||
/** Possible client states: */
|
||||
enum {
|
||||
RFB_PROTOCOL_VERSION, /**< establishing protocol version */
|
||||
- RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
|
||||
+ RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
|
||||
RFB_AUTHENTICATION, /**< authenticating */
|
||||
RFB_INITIALISATION, /**< sending initialisation messages */
|
||||
RFB_NORMAL, /**< normal protocol messages */
|
||||
@@ -500,6 +506,7 @@ typedef struct _rfbClientRec {
|
||||
* using LibVNCServer to provide services: */
|
||||
|
||||
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;
|
||||
|
||||
@@ -870,6 +877,9 @@ extern void rfbProcessClientSecurityType
|
||||
extern void rfbAuthProcessClientMessage(rfbClientPtr cl);
|
||||
extern void rfbRegisterSecurityHandler(rfbSecurityHandler* handler);
|
||||
extern void rfbUnregisterSecurityHandler(rfbSecurityHandler* handler);
|
||||
+extern void rfbRegisterChannelSecurityHandler(rfbSecurityHandler* handler);
|
||||
+extern void rfbUnregisterChannelSecurityHandler(rfbSecurityHandler* handler);
|
||||
+extern void rfbSendSecurityTypeList(rfbClientPtr cl, enum rfbSecurityTag exclude);
|
||||
|
||||
/* rre.c */
|
||||
|
||||
--
|
||||
2.50.0
|
||||
|
||||
|
BIN
LibVNCServer-0.9.14.tar.gz
(Stored with Git LFS)
BIN
LibVNCServer-0.9.14.tar.gz
(Stored with Git LFS)
Binary file not shown.
3
LibVNCServer-0.9.15.tar.gz
Normal file
3
LibVNCServer-0.9.15.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:62352c7795e231dfce044beb96156065a05a05c974e5de9e023d688d8ff675d7
|
||||
size 600387
|
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 26 07:53:57 UTC 2025 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Update to 0.9.15
|
||||
https://github.com/LibVNC/libvncserver/releases/tag/LibVNCServer-0.9.15
|
||||
* internal code structure cleanup
|
||||
* UTF-8 clipboard handling improvements
|
||||
* HTTP server support for multithreaded VNC servers
|
||||
* Fixed building with OpenSSL >= 3.0.0
|
||||
- Rebase patches
|
||||
- Fix devel package dependencies. The libraries have public link
|
||||
targets that must be present when LibVNCServer-devel is
|
||||
installed
|
||||
- Add upstream change to fix build failures with CMake 4:
|
||||
* 0001-CMake-require-at-least-CMake-3.5.patch
|
||||
- Spec refresh
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 23 14:44:58 UTC 2023 - pgajdos@suse.com
|
||||
|
||||
@@ -581,4 +598,3 @@ Sun Aug 21 03:27:19 CEST 2005 - garloff@suse.de
|
||||
|
||||
- Initial creation of package LibVNCServer-0.7.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
%define libnum 1
|
||||
Name: LibVNCServer
|
||||
Version: 0.9.14
|
||||
Version: 0.9.15
|
||||
Release: 0
|
||||
Summary: VNC Development Library
|
||||
License: GPL-2.0-or-later
|
||||
@@ -29,6 +29,8 @@ Source0: https://github.com/LibVNC/libvncserver/archive/%{name}-%{version
|
||||
Source1: baselibs.conf
|
||||
#PATCH-FIX-OPENSUSE: redefine keysyms only if needed
|
||||
Patch0: redef-keysym.patch
|
||||
# PATCH-FIX-UPSTREAM -- CMake 4 compat
|
||||
Patch1: 0001-CMake-require-at-least-CMake-3.5.patch
|
||||
#PATCH-FEATURE-UPSTREAM TLS security type enablement patches gh#LibVNC/libvncserver!234
|
||||
Patch10: 0001-libvncserver-Add-API-to-add-custom-I-O-entry-points.patch
|
||||
Patch11: 0002-libvncserver-Add-channel-security-handlers.patch
|
||||
@@ -43,7 +45,6 @@ BuildRequires: lzo-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: slang-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
VNC is a set of programs using the RFB (Remote Frame Buffer) protocol.
|
||||
@@ -60,8 +61,8 @@ real running X11 server) has been split off into its own package on
|
||||
%package -n libvncclient%{libnum}
|
||||
Summary: Library implementing a VNC client
|
||||
Group: System/Libraries
|
||||
Conflicts: LibVNCServer < %{version}
|
||||
Obsoletes: linuxvnc < %{version}
|
||||
Conflicts: LibVNCServer < %version
|
||||
|
||||
%description -n libvncclient%{libnum}
|
||||
LibVNCServer/LibVNCClient are cross-platform C libraries that allow
|
||||
@@ -76,12 +77,18 @@ LibVNCServer/LibVNCClient are cross-platform C libraries that allow
|
||||
implementing VNC server or client functionality in your program.
|
||||
|
||||
%package devel
|
||||
Requires: gnutls-devel
|
||||
Requires: libvncclient%{libnum} = %version
|
||||
Requires: libvncserver%{libnum} = %version
|
||||
Requires: zlib-devel
|
||||
Summary: VNC Development Library
|
||||
Group: Development/Libraries/X11
|
||||
Requires: gnutls-devel
|
||||
Requires: libgcrypt-devel
|
||||
Requires: libgnutls-devel
|
||||
Requires: libjpeg-devel
|
||||
Requires: libpng-devel
|
||||
Requires: libvncclient%{libnum} = %{version}
|
||||
Requires: libvncserver%{libnum} = %{version}
|
||||
Requires: lzo-devel
|
||||
Requires: openssl-devel
|
||||
Requires: zlib-devel
|
||||
|
||||
%description devel
|
||||
VNC is a set of programs using the RFB (Remote Frame Buffer) protocol.
|
||||
@@ -97,8 +104,7 @@ The LibVNCServer-devel package contains the static libraries and header
|
||||
files for LibVNCServer.
|
||||
|
||||
%prep
|
||||
%setup -q -n libvncserver-%{name}-%{version}
|
||||
%autopatch -p1
|
||||
%autosetup -p1 -n libvncserver-%{name}-%{version}
|
||||
|
||||
# fix encoding
|
||||
for file in ChangeLog ; do
|
||||
@@ -109,38 +115,34 @@ done
|
||||
|
||||
%build
|
||||
%cmake
|
||||
make %{?_smp_mflags}
|
||||
%cmake_build
|
||||
|
||||
%check
|
||||
pushd build
|
||||
export LD_LIBRARY_PATH="$(pwd)"
|
||||
make test
|
||||
%ctest
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%post -n libvncclient%{libnum} -p /sbin/ldconfig
|
||||
%postun -n libvncclient%{libnum} -p /sbin/ldconfig
|
||||
%post -n libvncserver%{libnum} -p /sbin/ldconfig
|
||||
%postun -n libvncserver%{libnum} -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets -n libvncclient%{libnum}
|
||||
%ldconfig_scriptlets -n libvncserver%{libnum}
|
||||
|
||||
%files -n libvncserver%{libnum}
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING README.md
|
||||
%_libdir/libvncserver.so.%{version}
|
||||
%_libdir/libvncserver.so.%{libnum}*
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%{_libdir}/libvncserver.so.%{version}
|
||||
%{_libdir}/libvncserver.so.%{libnum}*
|
||||
|
||||
%files -n libvncclient%{libnum}
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING README.md
|
||||
%_libdir/libvncclient.so.%{version}
|
||||
%_libdir/libvncclient.so.%{libnum}*
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%{_libdir}/libvncclient.so.%{version}
|
||||
%{_libdir}/libvncclient.so.%{libnum}*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog NEWS.md README.md
|
||||
%license COPYING
|
||||
%doc AUTHORS ChangeLog NEWS.md README.md
|
||||
%{_includedir}/rfb/*
|
||||
%dir /usr/include/rfb
|
||||
%dir %{_includedir}/rfb
|
||||
%{_libdir}/libvncclient.so
|
||||
%{_libdir}/libvncserver.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: LibVNCServer-0.8.2/rfb/keysym.h
|
||||
Index: LibVNCServer-0.8.2/include/rfb/keysym.h
|
||||
===================================================================
|
||||
--- LibVNCServer-0.8.2.orig/rfb/keysym.h
|
||||
+++ LibVNCServer-0.8.2/rfb/keysym.h
|
||||
--- LibVNCServer-0.8.2.orig/include/rfb/keysym.h
|
||||
+++ LibVNCServer-0.8.2/include/rfb/keysym.h
|
||||
@@ -50,15 +50,29 @@ SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
|
Reference in New Issue
Block a user