initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
From daecf59cc8b294265666482a4766aaa3148c308b Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 30 Nov 2019 11:43:32 -0800
|
||||
Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
|
||||
|
||||
time element is deprecated on new input_event structure in kernel's
|
||||
input.h [1]
|
||||
|
||||
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/LibVNC/x11vnc/commit/daecf59cc8b294265666482a4766aaa3148c308b]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/uinput.c | 25 +++++++++++++++++++++----
|
||||
1 file changed, 21 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/uinput.c b/src/uinput.c
|
||||
index 28fbad3..d71bcde 100644
|
||||
--- a/src/uinput.c
|
||||
+++ b/src/uinput.c
|
||||
@@ -54,6 +54,11 @@ so, delete this exception statement from your version.
|
||||
#include <linux/input.h>
|
||||
#include <linux/uinput.h>
|
||||
|
||||
+#ifndef input_event_sec
|
||||
+#define input_event_sec time.tv_sec
|
||||
+#define input_event_usec time.tv_usec
|
||||
+#endif
|
||||
+
|
||||
#if !defined(EV_SYN) || !defined(SYN_REPORT)
|
||||
#undef UINPUT_OK
|
||||
#endif
|
||||
@@ -710,6 +715,7 @@ void parse_uinput_str(char *in) {
|
||||
static void ptr_move(int dx, int dy) {
|
||||
#ifdef UINPUT_OK
|
||||
struct input_event ev;
|
||||
+ struct timeval tval;
|
||||
int d = direct_rel_fd < 0 ? fd : direct_rel_fd;
|
||||
|
||||
if (injectable && strchr(injectable, 'M') == NULL) {
|
||||
@@ -720,7 +726,9 @@ static void ptr_move(int dx, int dy) {
|
||||
|
||||
if (db) fprintf(stderr, "ptr_move(%d, %d) fd=%d\n", dx, dy, d);
|
||||
|
||||
- gettimeofday(&ev.time, NULL);
|
||||
+ gettimeofday(&tval, NULL);
|
||||
+ ev.input_event_sec = tval.tv_sec;
|
||||
+ ev.input_event_usec = tval.tv_usec;
|
||||
ev.type = EV_REL;
|
||||
ev.code = REL_Y;
|
||||
ev.value = dy;
|
||||
@@ -755,6 +763,7 @@ static void apply_tslib(int *x, int *y) {
|
||||
static void ptr_abs(int x, int y, int p) {
|
||||
#ifdef UINPUT_OK
|
||||
struct input_event ev;
|
||||
+ struct timeval tval;
|
||||
int x0, y0;
|
||||
int d = direct_abs_fd < 0 ? fd : direct_abs_fd;
|
||||
|
||||
@@ -773,7 +782,9 @@ static void ptr_abs(int x, int y, int p) {
|
||||
|
||||
if (db) fprintf(stderr, "ptr_abs(%d, %d => %d %d, p=%d) fd=%d\n", x0, y0, x, y, p, d);
|
||||
|
||||
- gettimeofday(&ev.time, NULL);
|
||||
+ gettimeofday(&tval, NULL);
|
||||
+ ev.input_event_sec = tval.tv_sec;
|
||||
+ ev.input_event_usec = tval.tv_usec;
|
||||
ev.type = EV_ABS;
|
||||
ev.code = ABS_Y;
|
||||
ev.value = y;
|
||||
@@ -950,6 +961,7 @@ if (0) {usleep(100*1000) ;}
|
||||
static void button_click(int down, int btn) {
|
||||
#ifdef UINPUT_OK
|
||||
struct input_event ev;
|
||||
+ struct timeval tval;
|
||||
int d = direct_btn_fd < 0 ? fd : direct_btn_fd;
|
||||
|
||||
if (injectable && strchr(injectable, 'B') == NULL) {
|
||||
@@ -959,7 +971,9 @@ static void button_click(int down, int btn) {
|
||||
if (db) fprintf(stderr, "button_click: btn %d %s fd=%d\n", btn, down ? "down" : "up", d);
|
||||
|
||||
memset(&ev, 0, sizeof(ev));
|
||||
- gettimeofday(&ev.time, NULL);
|
||||
+ gettimeofday(&tval, NULL);
|
||||
+ ev.input_event_sec = tval.tv_sec;
|
||||
+ ev.input_event_usec = tval.tv_usec;
|
||||
ev.type = EV_KEY;
|
||||
ev.value = down;
|
||||
|
||||
@@ -1230,6 +1244,7 @@ void uinput_pointer_command(int mask, int x, int y, rfbClientPtr client) {
|
||||
void uinput_key_command(int down, int keysym, rfbClientPtr client) {
|
||||
#ifdef UINPUT_OK
|
||||
struct input_event ev;
|
||||
+ struct timeval tval;
|
||||
int scancode;
|
||||
allowed_input_t input;
|
||||
int d = direct_key_fd < 0 ? fd : direct_key_fd;
|
||||
@@ -1253,7 +1268,9 @@ void uinput_key_command(int down, int keysym, rfbClientPtr client) {
|
||||
if (db) fprintf(stderr, "uinput_key_command: %d -> %d %s fd=%d\n", keysym, scancode, down ? "down" : "up", d);
|
||||
|
||||
memset(&ev, 0, sizeof(ev));
|
||||
- gettimeofday(&ev.time, NULL);
|
||||
+ gettimeofday(&tval, NULL);
|
||||
+ ev.input_event_sec = tval.tv_sec;
|
||||
+ ev.input_event_usec = tval.tv_usec;
|
||||
ev.type = EV_KEY;
|
||||
ev.code = (unsigned char) scancode;
|
||||
ev.value = down;
|
||||
@@ -0,0 +1,25 @@
|
||||
From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr>
|
||||
Date: Wed, 18 Nov 2020 08:40:45 +0100
|
||||
Subject: [PATCH] scan: limit access to shared memory segments to current user
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/scan.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/scan.c b/src/scan.c
|
||||
index 43e00d2..12994d5 100644
|
||||
--- a/src/scan.c
|
||||
+++ b/src/scan.c
|
||||
@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h,
|
||||
|
||||
#if HAVE_XSHM
|
||||
shm->shmid = shmget(IPC_PRIVATE,
|
||||
- xim->bytes_per_line * xim->height, IPC_CREAT | 0777);
|
||||
+ xim->bytes_per_line * xim->height, IPC_CREAT | 0600);
|
||||
|
||||
if (shm->shmid == -1) {
|
||||
rfbErr("shmget(%s) failed.\n", name);
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_X11VNC
|
||||
bool "x11vnc"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on !BR2_nios2 # libvncserver
|
||||
select BR2_PACKAGE_LIBVNCSERVER
|
||||
select BR2_PACKAGE_XLIB_LIBXT
|
||||
select BR2_PACKAGE_XLIB_LIBXEXT
|
||||
select BR2_PACKAGE_XLIB_LIBXTST
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160 if BR2_PACKAGE_LIBOPENSSL
|
||||
help
|
||||
VNC server for X11 display
|
||||
|
||||
http://www.karlrunge.com/x11vnc/
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 885e5b5f5f25eec6f9e4a1e8be3d0ac71a686331ee1cfb442dba391111bd32bd x11vnc-0.9.16.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
@@ -0,0 +1,70 @@
|
||||
################################################################################
|
||||
#
|
||||
# x11vnc
|
||||
#
|
||||
################################################################################
|
||||
|
||||
X11VNC_VERSION = 0.9.16
|
||||
X11VNC_SITE = $(call github,LibVNC,x11vnc,$(X11VNC_VERSION))
|
||||
# sdl support is not used in x11vnc, but host include / library search paths
|
||||
# leak in if host has sdl-config
|
||||
X11VNC_CONF_OPTS = --without-sdl
|
||||
X11VNC_DEPENDENCIES = xlib_libXt xlib_libXext xlib_libXtst libvncserver
|
||||
X11VNC_LICENSE = GPL-2.0+
|
||||
X11VNC_LICENSE_FILES = COPYING
|
||||
X11VNC_CPE_ID_VENDOR = x11vnc_project
|
||||
# 0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch
|
||||
X11VNC_IGNORE_CVES += CVE-2020-29074
|
||||
|
||||
# Source coming from github, no configure included
|
||||
X11VNC_AUTORECONF = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
|
||||
X11VNC_DEPENDENCIES += avahi dbus
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-avahi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JPEG),y)
|
||||
X11VNC_DEPENDENCIES += jpeg
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-jpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
X11VNC_DEPENDENCIES += openssl
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-ssl --without-crypto
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
|
||||
X11VNC_DEPENDENCIES += xlib_libXinerama
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-xinerama
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
|
||||
X11VNC_DEPENDENCIES += xlib_libXrandr
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-xrandr
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y)
|
||||
X11VNC_DEPENDENCIES += xlib_libXfixes
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-xfixes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y)
|
||||
X11VNC_DEPENDENCIES += xlib_libXdamage
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-xdamage
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
X11VNC_DEPENDENCIES += zlib
|
||||
else
|
||||
X11VNC_CONF_OPTS += --without-zlib
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user