[pkg-remote-commits] [xrdp] 03/06: Refresh patches; drop all that are applied upstream (or solved differently there).
Thorsten Glaser
tg at moszumanska.debian.org
Sat Mar 25 19:48:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
tg pushed a commit to branch experimental
in repository xrdp.
commit 9fd0d915b096e59938df0cd6e6a95792e04caa2b
Author: mirabilos <thorsten.glaser at teckids.org>
Date: Sat Mar 25 19:15:50 2017 +0100
Refresh patches; drop all that are applied upstream (or solved differently there).
---
debian/changelog | 3 +-
debian/patches/config.diff | 16 +--
debian/patches/fix_perms.diff | 22 ++--
debian/patches/highres.diff | 51 ---------
debian/patches/kfreebsd.diff | 63 ----------
debian/patches/lfs.diff | 28 +----
debian/patches/make-fixes.diff | 15 ++-
debian/patches/misc-fixes.diff | 8 +-
debian/patches/series | 2 -
debian/patches/shutup-daemon.diff | 6 +-
debian/patches/sockpath.diff | 234 +++++++-------------------------------
debian/patches/systemd.diff | 18 +--
debian/rules | 3 +-
13 files changed, 81 insertions(+), 388 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7b3a3ad..e8e2d8f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@ xrdp (0.9.2~20170325-1~exp1) experimental; urgency=low
* Merge uploads from unstable.
* Run libpainter/bootstrap as well.
* Update debian/copyright file for the new upstream snapshot.
+ * Refresh patches; drop patches applied upstream.
- -- Thorsten Glaser <tg at mirbsd.de> Sat, 25 Mar 2017 18:39:48 +0100
+ -- Thorsten Glaser <tg at mirbsd.de> Sat, 25 Mar 2017 19:15:31 +0100
xrdp (0.9.1-7) unstable; urgency=medium
diff --git a/debian/patches/config.diff b/debian/patches/config.diff
index bd5995c..cf57106 100644
--- a/debian/patches/config.diff
+++ b/debian/patches/config.diff
@@ -2,7 +2,7 @@ From: Dominik George <nik at naturalnet.de>
Subject: Use xorgxrdp instead of x11rdp
--- a/sesman/sesman.ini
+++ b/sesman/sesman.ini
-@@ -61,12 +61,13 @@ LogLevel=DEBUG
+@@ -54,12 +54,13 @@ LogLevel=DEBUG
EnableSyslog=1
SyslogLevel=DEBUG
@@ -20,7 +20,7 @@ Subject: Use xorgxrdp instead of x11rdp
[Xvnc]
param=Xvnc
-@@ -77,16 +78,6 @@ param=-localhost
+@@ -70,16 +71,6 @@ param=-localhost
param=-dpi
param=96
@@ -39,9 +39,9 @@ Subject: Use xorgxrdp instead of x11rdp
FuseMountName=thinclient_drives
--- a/xrdp/xrdp.ini
+++ b/xrdp/xrdp.ini
-@@ -147,16 +147,6 @@ tcutils=true
- ; Session types
- ;
+@@ -157,16 +157,6 @@ ip=127.0.0.1
+ port=-1
+ code=20
-[X11rdp]
-name=X11rdp
@@ -53,6 +53,6 @@ Subject: Use xorgxrdp instead of x11rdp
-xserverbpp=24
-code=10
-
- [Xorg]
- name=Xorg
- lib=libxup.so
+ [Xvnc]
+ name=Xvnc
+ lib=libvnc.so
diff --git a/debian/patches/fix_perms.diff b/debian/patches/fix_perms.diff
index 48400ff..a5a570f 100644
--- a/debian/patches/fix_perms.diff
+++ b/debian/patches/fix_perms.diff
@@ -8,42 +8,42 @@ Forwarded: https://github.com/neutrinolabs/xorgxrdp/pull/16
https://github.com/neutrinolabs/xrdp/pull/464
--- a/common/os_calls.c
+++ b/common/os_calls.c
-@@ -122,7 +122,7 @@ g_mk_temp_dir(const char *app_name)
+@@ -123,7 +123,7 @@ g_mk_temp_dir(const char *app_name)
return 1;
}
}
-- g_chmod_hex("/tmp/.xrdp", 0x1777);
-+ g_chmod_hex("/tmp/.xrdp", 0x3777);
+- g_chmod_hex(XRDP_SOCKET_PATH, 0x1777);
++ g_chmod_hex(XRDP_SOCKET_PATH, 0x3777);
}
return 0;
}
--- a/xorg/X11R7.6/rdp/rdpup.c
+++ b/xorg/X11R7.6/rdp/rdpup.c
-@@ -1242,7 +1242,7 @@ rdpup_init(void)
+@@ -1245,7 +1245,7 @@ rdpup_init(void)
return 0;
}
-- g_chmod_hex("/tmp/.xrdp", 0x1777);
-+ g_chmod_hex("/tmp/.xrdp", 0x3777);
+- g_chmod_hex(socket_dir, 0x1777);
++ g_chmod_hex(socket_dir, 0x3777);
}
i = atoi(display);
--- a/xorgxrdp/module/rdpClientCon.c
+++ b/xorgxrdp/module/rdpClientCon.c
-@@ -1176,7 +1176,7 @@ rdpClientConInit(rdpPtr dev)
+@@ -1186,7 +1186,7 @@ rdpClientConInit(rdpPtr dev)
return 0;
}
}
-- g_chmod_hex("/tmp/.xrdp", 0x1777);
-+ g_chmod_hex("/tmp/.xrdp", 0x3777);
+- g_chmod_hex(socket_dir, 0x1777);
++ g_chmod_hex(socket_dir, 0x3777);
}
i = atoi(display);
if (i < 1)
-@@ -1195,6 +1195,7 @@ rdpClientConInit(rdpPtr dev)
+@@ -1205,6 +1205,7 @@ rdpClientConInit(rdpPtr dev)
return 1;
}
g_sck_listen(dev->listen_sck);
+ g_chmod_hex(dev->uds_data, 0x0660);
rdpClientConAddEnabledDevice(dev->pScreen, dev->listen_sck);
}
- return 0;
+
diff --git a/debian/patches/highres.diff b/debian/patches/highres.diff
deleted file mode 100644
index 8bf64ba..0000000
--- a/debian/patches/highres.diff
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Dominik George <nik at naturalnet.de>
-Forwarded: https://github.com/neutrinolabs/xrdp/pull/664
-Acked-by: Thorsten Glaser <tg at mirbsd.de>
-Subject: RFX fixes for large tile sets.
- This patch disables the limitation of rects to use and then
- dynamically calculates the size of the message from the
- rects that are really used.
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855387
-Bug: https://github.com/neutrinolabs/xrdp/issues/524
---- a/xrdp/xrdp_encoder.c
-+++ b/xrdp/xrdp_encoder.c
-@@ -22,6 +22,7 @@
- #include "xrdp.h"
- #include "thread_calls.h"
- #include "fifo.h"
-+#include "limits.h"
-
- #ifdef XRDP_RFXCODEC
- #include "rfxcodec_encode.h"
-@@ -320,21 +321,25 @@ process_enc_rfx(struct xrdp_encoder *sel
- mutex = self->mutex;
- event_processed = self->xrdp_encoder_event_processed;
-
-- if ((enc->num_crects > 512) || (enc->num_drects > 512))
-- {
-+ out_data_bytes = 16 * 1024 * 1024;
-+
-+ if ((enc->num_crects > (INT_MAX / sizeof(struct rfx_tile))) ||
-+ (enc->num_drects > (INT_MAX / sizeof(struct rfx_rect) -
-+ sizeof(struct rfx_tile) * enc->num_crects -
-+ 256 - out_data_bytes)) ||
-+ (enc->num_crects < 0) || (enc->num_drects < 0)) {
- return 0;
- }
-
-- out_data_bytes = 16 * 1024 * 1024;
-- index = 256 + sizeof(struct rfx_tile) * 512 +
-- sizeof(struct rfx_rect) * 512;
-+ index = 256 + sizeof(struct rfx_tile) * enc->num_crects +
-+ sizeof(struct rfx_rect) * enc->num_drects;
- out_data = (char *) g_malloc(out_data_bytes + index, 0);
- if (out_data == 0)
- {
- return 0;
- }
- tiles = (struct rfx_tile *) (out_data + out_data_bytes + 256);
-- rfxrects = (struct rfx_rect *) (tiles + 512);
-+ rfxrects = (struct rfx_rect *) (tiles + enc->num_crects);
-
- count = enc->num_crects;
- for (index = 0; index < count; index++)
diff --git a/debian/patches/kfreebsd.diff b/debian/patches/kfreebsd.diff
deleted file mode 100644
index 6ac7387..0000000
--- a/debian/patches/kfreebsd.diff
+++ /dev/null
@@ -1,63 +0,0 @@
-From: Thorsten Glaser <tg at mirbsd.org>
-Subject: Recognise GNU/kFreeBSD as FreeBSD variant in code,
- but as a Linux for instfiles/ (init scripts and so on)
-Forwarded: https://github.com/neutrinolabs/xrdp/pull/645
-Reviewed-by: Dominik George <nik at naturalnet.de>
---- a/common/os_calls.c
-+++ b/common/os_calls.c
-@@ -87,8 +87,8 @@ extern char **environ;
- #endif
-
- /* sys/ucred.h needs to be included to use struct xucred
-- * in FreeBSD and OS X. No need for other BSDs */
--#if defined(__FreeBSD__) || defined(__APPLE__)
-+ * in FreeBSD and OS X. No need for other BSDs except GNU/kFreeBSD */
-+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
- #include <sys/ucred.h>
- #endif
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -24,6 +24,9 @@ case $host_os in
- *linux*)
- linux=yes
- ;;
-+ *kfreebsd*)
-+ linux=yes # only used in instfiles/ so that’s ok for us for now
-+ ;;
- *freebsd*)
- freebsd=yes
- ;;
---- a/librfxcodec/acinclude.m4
-+++ b/librfxcodec/acinclude.m4
-@@ -40,7 +40,7 @@ case "$host_os" in
- ;;
- esac
- ;;
-- freebsd* | netbsd* | openbsd*)
-+ kfreebsd* | freebsd* | netbsd* | openbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- objfmt='BSD-a.out'
- else
---- a/sesman/session.c
-+++ b/sesman/session.c
-@@ -503,7 +503,7 @@ session_start_fork(tbus data, tui8 type,
- g_sprintf(geometry, "%dx%d", s->width, s->height);
- g_sprintf(depth, "%d", s->bpp);
- g_sprintf(screen, ":%d", display);
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- /*
- * FreeBSD bug
- * ports/157282: effective login name is not set by xrdp-sesman
---- a/xorgxrdp/acinclude.m4
-+++ b/xorgxrdp/acinclude.m4
-@@ -40,7 +40,7 @@ case "$host_os" in
- ;;
- esac
- ;;
-- freebsd* | netbsd* | openbsd*)
-+ kfreebsd* | freebsd* | netbsd* | openbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- objfmt='BSD-a.out'
- else
diff --git a/debian/patches/lfs.diff b/debian/patches/lfs.diff
index e6d12e7..4c7a675 100644
--- a/debian/patches/lfs.diff
+++ b/debian/patches/lfs.diff
@@ -12,13 +12,7 @@ Reviewed-by: Dominik George <nik at naturalnet.de>
+AC_FUNC_FSEEKO
AC_C_CONST
AC_PROG_LIBTOOL
- PKG_PROG_PKG_CONFIG
-@@ -320,4 +322,5 @@ AC_CONFIG_FILES([
- xup/Makefile
- ])
-+CPPFLAGS="-include config_ac.h $CPPFLAGS"
- AC_OUTPUT
--- a/libpainter/configure.ac
+++ b/libpainter/configure.ac
@@ -6,6 +6,8 @@ AC_CONFIG_HEADERS(config_ac.h:config_ac-
@@ -30,30 +24,17 @@ Reviewed-by: Dominik George <nik at naturalnet.de>
AC_C_CONST
AC_PROG_LIBTOOL
PKG_INSTALLDIR
-@@ -34,4 +36,5 @@ AC_CONFIG_FILES([
- tests/Makefile
- ])
-
-+CPPFLAGS="-include config_ac.h $CPPFLAGS"
- AC_OUTPUT
--- a/librfxcodec/configure.ac
+++ b/librfxcodec/configure.ac
@@ -7,6 +7,8 @@ AM_INIT_AUTOMAKE([1.6 foreign])
AC_CONFIG_MACRO_DIR([m4])
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
AC_C_CONST
AC_PROG_LIBTOOL
PKG_INSTALLDIR
-@@ -49,5 +51,6 @@ AC_CONFIG_FILES([Makefile
- rfxcodec-uninstalled.pc
- ])
-
-+CPPFLAGS="-include config_ac.h $CPPFLAGS"
- AC_OUTPUT
-
--- a/xorgxrdp/configure.ac
+++ b/xorgxrdp/configure.ac
@@ -6,6 +6,8 @@ AC_CONFIG_HEADERS(config_ac.h:config_ac-
@@ -65,10 +46,3 @@ Reviewed-by: Dominik George <nik at naturalnet.de>
AC_C_CONST
AC_PROG_LIBTOOL
-@@ -72,5 +74,6 @@ AC_CONFIG_FILES([Makefile
- xrdpmouse/Makefile
- ])
-
-+CPPFLAGS="-include config_ac.h $CPPFLAGS"
- AC_OUTPUT
-
diff --git a/debian/patches/make-fixes.diff b/debian/patches/make-fixes.diff
index bb43865..57ddc62 100644
--- a/debian/patches/make-fixes.diff
+++ b/debian/patches/make-fixes.diff
@@ -1,11 +1,14 @@
From: Thorsten Glaser <tg at mirbsd.org>
Subject: Build system fixes
- recurse into xorgxrdp/ as well (make into proper configure option?)
- also, actually install keymaps shipped
+ * recurse into xorgxrdp/ as well (make into proper configure option?)
+ * check whether libdl is needed
+ * fix librfxcodec inclusion by xrdp
+ * add missing libcommon to xrdpapi
Forwarded: https://github.com/neutrinolabs/xrdp/pull/467
+ (but may need updating)
--- a/Makefile.am
+++ b/Makefile.am
-@@ -65,4 +65,5 @@ SUBDIRS = \
+@@ -66,4 +66,5 @@ SUBDIRS = \
genkeymap \
xrdpapi \
pkgconfig \
@@ -13,7 +16,7 @@ Forwarded: https://github.com/neutrinolabs/xrdp/pull/467
$(XRDPVRDIR)
--- a/configure.ac
+++ b/configure.ac
-@@ -264,6 +264,14 @@ AC_CHECK_HEADER([X11/extensions/Xrandr.h
+@@ -294,6 +294,14 @@ AC_CHECK_HEADER([X11/extensions/Xrandr.h
[AC_MSG_ERROR([please install libxrandr-dev or libXrandr-devel])],
[#include <X11/Xlib.h>])
@@ -30,7 +33,7 @@ Forwarded: https://github.com/neutrinolabs/xrdp/pull/467
AC_SUBST([moduledir], '${libdir}/xrdp')
--- a/xrdp/Makefile.am
+++ b/xrdp/Makefile.am
-@@ -24,7 +24,7 @@ endif
+@@ -23,7 +23,7 @@ endif
if XRDP_RFXCODEC
AM_CPPFLAGS += -DXRDP_RFXCODEC
AM_CPPFLAGS += -I$(top_srcdir)/librfxcodec/include
@@ -41,7 +44,7 @@ Forwarded: https://github.com/neutrinolabs/xrdp/pull/467
if XRDP_PIXMAN
--- a/xrdpapi/Makefile.am
+++ b/xrdpapi/Makefile.am
-@@ -9,3 +9,9 @@ module_LTLIBRARIES = \
+@@ -13,3 +13,9 @@ module_LTLIBRARIES = \
libxrdpapi_la_SOURCES = \
xrdpapi.c \
xrdpapi.h
diff --git a/debian/patches/misc-fixes.diff b/debian/patches/misc-fixes.diff
index 19f365b..3196054 100644
--- a/debian/patches/misc-fixes.diff
+++ b/debian/patches/misc-fixes.diff
@@ -4,7 +4,7 @@ Forwarded: https://github.com/neutrinolabs/xorgxrdp/pull/17
https://github.com/neutrinolabs/xrdp/pull/467
--- a/xorgxrdp/xrdpkeyb/rdpKeyboard.c
+++ b/xorgxrdp/xrdpkeyb/rdpKeyboard.c
-@@ -534,7 +534,7 @@ rdpInputKeyboard(rdpPtr dev, int msg, lo
+@@ -538,7 +538,7 @@ rdpInputKeyboard(rdpPtr dev, int msg, lo
}
/******************************************************************************/
@@ -13,15 +13,15 @@ Forwarded: https://github.com/neutrinolabs/xorgxrdp/pull/17
rdpkeybDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap)
{
int i;
-@@ -565,7 +565,7 @@ rdpkeybDeviceInit(DeviceIntPtr pDevice,
+@@ -569,7 +569,7 @@ rdpkeybDeviceInit(DeviceIntPtr pDevice,
if (pKeySyms->map == 0)
{
LLOGLN(0, ("rdpkeybDeviceInit: out of memory"));
- exit(1);
+ return 1;
}
- else
- {
+
+ for (i = 0; i < MAP_LENGTH * GLYPHS_PER_KEY; i++)
@@ -581,6 +581,8 @@ rdpkeybDeviceInit(DeviceIntPtr pDevice,
{
pKeySyms->map[i] = g_kbdMap[i];
diff --git a/debian/patches/series b/debian/patches/series
index f130e3b..525fbe4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,7 +4,5 @@ misc-fixes.diff
fix_perms.diff
shutup-daemon.diff
sockpath.diff
-kfreebsd.diff
systemd.diff
lfs.diff
-highres.diff
diff --git a/debian/patches/shutup-daemon.diff b/debian/patches/shutup-daemon.diff
index c53d9a2..3c3d12d 100644
--- a/debian/patches/shutup-daemon.diff
+++ b/debian/patches/shutup-daemon.diff
@@ -2,7 +2,7 @@ From: Thorsten Glaser <tg at mirbsd.org>
Subject: don’t spit on the console when starting
--- a/common/log.c
+++ b/common/log.c
-@@ -383,11 +383,6 @@ internal_config_read_logging(int file, s
+@@ -387,11 +387,6 @@ internal_config_read_logging(int file, s
/* try to create path if not exist */
g_create_path(lc->log_file);
@@ -16,7 +16,7 @@ Subject: don’t spit on the console when starting
--- a/sesman/sesman.c
+++ b/sesman/sesman.c
-@@ -149,6 +149,12 @@ main(int argc, char **argv)
+@@ -166,6 +166,12 @@ main(int argc, char **argv)
if (1 == argc)
{
@@ -31,7 +31,7 @@ Subject: don’t spit on the console when starting
daemon = 1;
--- a/xrdp/xrdp.c
+++ b/xrdp/xrdp.c
-@@ -544,7 +544,6 @@ main(int argc, char **argv)
+@@ -549,7 +549,6 @@ main(int argc, char **argv)
if (0 != pid)
{
diff --git a/debian/patches/sockpath.diff b/debian/patches/sockpath.diff
index 341629c..46fb779 100644
--- a/debian/patches/sockpath.diff
+++ b/debian/patches/sockpath.diff
@@ -1,89 +1,29 @@
From: Thorsten Glaser <tg at mirbsd.org>
Subject: change location of the socket path to something less racy
also, rely on the initscript to create it with correct permissions and ownership
---- a/common/file_loc.h
-+++ b/common/file_loc.h
-@@ -46,23 +46,23 @@
- #endif
-
- #if !defined(XRDP_CHANSRV_STR)
--#define XRDP_CHANSRV_STR "/tmp/.xrdp/xrdp_chansrv_socket_%d"
-+#define XRDP_CHANSRV_STR "/var/run/xrdp/sockdir/xrdp_chansrv_socket_%d"
- #endif
-
- #if !defined(CHANSRV_PORT_OUT_STR)
--#define CHANSRV_PORT_OUT_STR "/tmp/.xrdp/xrdp_chansrv_audio_out_socket_%d"
-+#define CHANSRV_PORT_OUT_STR "/var/run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_%d"
- #endif
-
- #if !defined(CHANSRV_PORT_IN_STR)
--#define CHANSRV_PORT_IN_STR "/tmp/.xrdp/xrdp_chansrv_audio_in_socket_%d"
-+#define CHANSRV_PORT_IN_STR "/var/run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_%d"
- #endif
-
- #if !defined(CHANSRV_API_STR)
--#define CHANSRV_API_STR "/tmp/.xrdp/xrdpapi_%d"
-+#define CHANSRV_API_STR "/var/run/xrdp/sockdir/xrdpapi_%d"
- #endif
-
- #if !defined(XRDP_X11RDP_STR)
--#define XRDP_X11RDP_STR "/tmp/.xrdp/xrdp_display_%d"
-+#define XRDP_X11RDP_STR "/var/run/xrdp/sockdir/xrdp_display_%d"
- #endif
-
- #endif
--- a/common/os_calls.c
+++ b/common/os_calls.c
-@@ -111,18 +111,10 @@ g_rm_temp_dir(void)
- int APP_CC
- g_mk_temp_dir(const char *app_name)
+@@ -113,17 +113,9 @@ g_mk_temp_dir(const char *app_name)
{
-- if (!g_directory_exist("/tmp/.xrdp"))
-+ if (!g_directory_exist("/var/run/xrdp/sockdir"))
+ if (!g_directory_exist(XRDP_SOCKET_PATH))
{
-- if (!g_create_dir("/tmp/.xrdp"))
+- if (!g_create_dir(XRDP_SOCKET_PATH))
- {
- /* if failed, still check if it got created by someone else */
-- if (!g_directory_exist("/tmp/.xrdp"))
+- if (!g_directory_exist(XRDP_SOCKET_PATH))
- {
-- printf("g_mk_temp_dir: g_create_dir failed\n");
-+ printf("g_mk_temp_dir: /var/run/xrdp/sockdir does not exist\n");
+ printf("g_mk_temp_dir: g_create_dir(%s) failed\n",
+ XRDP_SOCKET_PATH);
return 1;
- }
- }
-- g_chmod_hex("/tmp/.xrdp", 0x3777);
+- g_chmod_hex(XRDP_SOCKET_PATH, 0x3777);
}
return 0;
}
---- a/docs/man/xrdp-chansrv.8
-+++ b/docs/man/xrdp-chansrv.8
-@@ -30,10 +30,10 @@ Dynamic Virtual Channel
-
- .SH FILES
- .TP
--.I /tmp/.xrdp/xrdp_chansrv_socket_*
-+.I /var/run/xrdp/sockdir/xrdp_chansrv_socket_*
- UNIX socket used by external programs to implement channels.
- .TP
--.I /tmp/.xrdp/xrdp_api_*
-+.I /var/run/xrdp/sockdir/xrdp_api_*
- UNIX socket used by \fBxrdp\-chansrv\fP to communicate with \fBxrdp\-sesman\fP.
- .TP
- .I $XDG_DATA_HOME/xrdp/xrdp-chansrv.log
---- a/docs/man/xrdp-dis.1
-+++ b/docs/man/xrdp-dis.1
-@@ -16,7 +16,7 @@ to get the default host and display numb
-
- .SH FILES
- .TP
--.I /tmp/.xrdp/xrdp_disconnect_display_*
-+.I /var/run/xrdp/sockdir/xrdp_disconnect_display_*
- UNIX socket used to communicate with the \fBxrdp\fP(8) session manager.
-
- .SH KNOWN ISSUES
--- a/instfiles/xrdp.service
+++ b/instfiles/xrdp.service
-@@ -8,8 +8,11 @@ Type=forking
+@@ -9,8 +9,11 @@ Type=forking
PIDFile=/var/run/xrdp.pid
EnvironmentFile=-/etc/sysconfig/xrdp
EnvironmentFile=-/etc/default/xrdp
@@ -95,150 +35,65 @@ Subject: change location of the socket path to something less racy
[Install]
WantedBy=multi-user.target
---- a/sesman/chansrv/pulse/module-xrdp-sink.c
-+++ b/sesman/chansrv/pulse/module-xrdp-sink.c
-@@ -84,7 +84,7 @@ PA_MODULE_USAGE(
- #define DEFAULT_SINK_NAME "xrdp-sink"
- #define BLOCK_USEC 30000
- //#define BLOCK_USEC (PA_USEC_PER_SEC * 2)
--#define CHANSRV_PORT_STR "/tmp/.xrdp/xrdp_chansrv_audio_out_socket_%d"
-+#define CHANSRV_PORT_STR "/var/run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_%d"
-
- struct userdata {
- pa_core *core;
---- a/sesman/chansrv/pulse/module-xrdp-source.c
-+++ b/sesman/chansrv/pulse/module-xrdp-source.c
-@@ -72,7 +72,7 @@ PA_MODULE_USAGE(
- #define DEFAULT_SOURCE_NAME "xrdp-source"
- #define DEFAULT_LATENCY_TIME 10
- #define MAX_LATENCY_USEC 1000
--#define CHANSRV_PORT_STR "/tmp/.xrdp/xrdp_chansrv_audio_in_socket_%d"
-+#define CHANSRV_PORT_STR "/var/run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_%d"
-
- struct userdata {
- pa_core *core;
---- a/sesman/sessvc/sessvc.c
-+++ b/sesman/sessvc/sessvc.c
-@@ -55,14 +55,14 @@ chansrv_cleanup(int pid)
- {
- char text[256];
-
-- g_snprintf(text, 255, "/tmp/.xrdp/xrdp_chansrv_%8.8x_main_term", pid);
-+ g_snprintf(text, 255, "/var/run/xrdp/sockdir/xrdp_chansrv_%8.8x_main_term", pid);
-
- if (g_file_exist(text))
+--- a/xorg/X11R7.6/rdp/rdpmisc.c
++++ b/xorg/X11R7.6/rdp/rdpmisc.c
+@@ -527,7 +527,7 @@ g_socket_dir(void)
+ socket_dir = getenv("XRDP_SOCKET_PATH");
+ if (socket_dir == NULL || socket_dir[0] == '\0')
{
- g_file_delete(text);
+- socket_dir = "/tmp/.xrdp";
++ socket_dir = "/var/run/xrdp/sockdir";
}
-- g_snprintf(text, 255, "/tmp/.xrdp/xrdp_chansrv_%8.8x_thread_done", pid);
-+ g_snprintf(text, 255, "/var/run/xrdp/sockdir/xrdp_chansrv_%8.8x_thread_done", pid);
-
- if (g_file_exist(text))
- {
---- a/sesman/tools/dis.c
-+++ b/sesman/tools/dis.c
-@@ -50,7 +50,7 @@ int main(int argc, char **argv)
- dis = strtol(display + 1, &p, 10);
- memset(&sa, 0, sizeof(sa));
- sa.sun_family = AF_UNIX;
-- sprintf(sa.sun_path, "/tmp/.xrdp/xrdp_disconnect_display_%d", dis);
-+ sprintf(sa.sun_path, "/var/run/xrdp/sockdir/xrdp_disconnect_display_%d", dis);
-
- if (access(sa.sun_path, F_OK) != 0)
- {
---- a/xorg/X11R7.6/rdp/rdpmain.c
-+++ b/xorg/X11R7.6/rdp/rdpmain.c
-@@ -769,7 +769,7 @@ ddxGiveUp(void)
- {
- sprintf(unixSocketName, "/tmp/.X11-unix/X%s", display);
- unlink(unixSocketName);
-- sprintf(unixSocketName, "/tmp/.xrdp/xrdp_disconnect_display_%s", display);
-+ sprintf(unixSocketName, "/var/run/xrdp/sockdir/xrdp_disconnect_display_%s", display);
- unlink(unixSocketName);
-
- if (g_uds_data[0] != 0)
-@@ -823,7 +823,7 @@ ddxUseMsg(void)
- ErrorF("X11rdp specific options\n");
- ErrorF("-geometry WxH set framebuffer width & height\n");
- ErrorF("-depth D set framebuffer depth\n");
-- ErrorF("-uds create and listen on /tmp/.xrdp/xrdp_display_x\n");
-+ ErrorF("-uds create and listen on /var/run/xrdp/sockdir/xrdp_display_x\n");
- ErrorF("\n");
- exit(1);
- }
+ return socket_dir;
--- a/xorg/X11R7.6/rdp/rdpup.c
+++ b/xorg/X11R7.6/rdp/rdpup.c
-@@ -1234,15 +1234,10 @@ rdpup_init(void)
- char *ptext;
- int i;
+@@ -1239,13 +1239,8 @@ rdpup_init(void)
-- if (!g_directory_exist("/tmp/.xrdp"))
-+ if (!g_directory_exist("/var/run/xrdp/sockdir"))
+ if (!g_directory_exist(socket_dir))
{
-- if (!g_create_dir("/tmp/.xrdp"))
+- if (!g_create_dir(socket_dir))
- {
-- LLOGLN(0, ("rdpup_init: g_create_dir failed"));
-+ LLOGLN(0, ("rdpup_init: /var/run/xrdp/sockdir does not exist"));
+ LLOGLN(0, ("rdpup_init: g_create_dir(%s) failed", socket_dir));
return 0;
- }
-
-- g_chmod_hex("/tmp/.xrdp", 0x3777);
+- g_chmod_hex(socket_dir, 0x3777);
}
i = atoi(display);
-@@ -1266,7 +1261,7 @@ rdpup_init(void)
-
- if (g_use_uds)
- {
-- g_sprintf(g_uds_data, "/tmp/.xrdp/xrdp_display_%s", display);
-+ g_sprintf(g_uds_data, "/var/run/xrdp/sockdir/xrdp_display_%s", display);
-
- if (g_listen_sck == 0)
- {
-@@ -1304,7 +1299,7 @@ rdpup_init(void)
-
- if (g_dis_listen_sck != 0)
- {
-- g_sprintf(text, "/tmp/.xrdp/xrdp_disconnect_display_%s", display);
-+ g_sprintf(text, "/var/run/xrdp/sockdir/xrdp_disconnect_display_%s", display);
-
- if (g_tcp_local_bind(g_dis_listen_sck, text) == 0)
- {
--- a/xorgxrdp/module/rdpClientCon.c
+++ b/xorgxrdp/module/rdpClientCon.c
-@@ -1166,17 +1166,10 @@ rdpClientConInit(rdpPtr dev)
- {
- int i;
-
-- if (!g_directory_exist("/tmp/.xrdp"))
-+ if (!g_directory_exist("/var/run/xrdp/sockdir"))
+@@ -1178,15 +1178,8 @@ rdpClientConInit(rdpPtr dev)
+ socket_dir = g_socket_dir();
+ if (!g_directory_exist(socket_dir))
{
-- if (!g_create_dir("/tmp/.xrdp"))
+- if (!g_create_dir(socket_dir))
- {
-- if (!g_directory_exist("/tmp/.xrdp"))
+- if (!g_directory_exist(socket_dir))
- {
-- LLOGLN(0, ("rdpup_init: g_create_dir failed"));
-+ LLOGLN(0, ("rdpup_init: /var/run/xrdp/sockdir does not exist"));
+ LLOGLN(0, ("rdpup_init: g_create_dir(%s) failed", socket_dir));
return 0;
- }
- }
-- g_chmod_hex("/tmp/.xrdp", 0x3777);
+- g_chmod_hex(socket_dir, 0x3777);
}
i = atoi(display);
if (i < 1)
-@@ -1184,7 +1177,7 @@ rdpClientConInit(rdpPtr dev)
- LLOGLN(0, ("rdpClientConInit: can not run at display < 1"));
- return 0;
- }
-- g_sprintf(dev->uds_data, "/tmp/.xrdp/xrdp_display_%s", display);
-+ g_sprintf(dev->uds_data, "/var/run/xrdp/sockdir/xrdp_display_%s", display);
- if (dev->listen_sck == 0)
+--- a/xorgxrdp/module/rdpMisc.c
++++ b/xorgxrdp/module/rdpMisc.c
+@@ -388,7 +388,7 @@ g_socket_dir(void)
+ socket_dir = getenv("XRDP_SOCKET_PATH");
+ if (socket_dir == NULL || socket_dir[0] == '\0')
{
- unlink(dev->uds_data);
+- socket_dir = "/tmp/.xrdp";
++ socket_dir = "/var/run/xrdp/sockdir";
+ }
+
+ return socket_dir;
--- a/xrdp/xrdp.ini
+++ b/xrdp/xrdp.ini
-@@ -137,10 +137,10 @@ xrdpvr=true
+@@ -138,10 +138,10 @@ xrdpvr=true
tcutils=true
; for debugging xrdp, in section xrdp1, change port=-1 to this:
@@ -251,14 +106,3 @@ Subject: change location of the socket path to something less racy
;
---- a/xrdpapi/xrdpapi.c
-+++ b/xrdpapi/xrdpapi.c
-@@ -144,7 +144,7 @@ WTSVirtualChannelOpenEx(unsigned int Ses
- memset(&s, 0, sizeof(struct sockaddr_un));
- s.sun_family = AF_UNIX;
- bytes = sizeof(s.sun_path);
-- snprintf(s.sun_path, bytes - 1, "/tmp/.xrdp/xrdpapi_%d", wts->display_num);
-+ snprintf(s.sun_path, bytes - 1, "/var/run/xrdp/sockdir/xrdpapi_%d", wts->display_num);
- s.sun_path[bytes - 1] = 0;
- bytes = sizeof(struct sockaddr_un);
-
diff --git a/debian/patches/systemd.diff b/debian/patches/systemd.diff
index 76f1196..b563840 100644
--- a/debian/patches/systemd.diff
+++ b/debian/patches/systemd.diff
@@ -3,15 +3,7 @@ From: Dominik George <nik at naturalnet.de>
Forwarded: https://github.com/neutrinolabs/xrdp/pull/646
--- a/instfiles/xrdp-sesman.service
+++ b/instfiles/xrdp-sesman.service
-@@ -1,12 +1,14 @@
- [Unit]
- Description=xrdp session manager
--After=syslog.target network.target
-+Documentation=man:xrdp-sesman(8) man:sesman.ini(5)
-+After=network.target
- StopWhenUnneeded=true
--BindTo=xrdp.service
-+BindsTo=xrdp.service
+@@ -7,7 +7,8 @@ BindsTo=xrdp.service
[Service]
Type=forking
@@ -23,13 +15,7 @@ Forwarded: https://github.com/neutrinolabs/xrdp/pull/646
ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS
--- a/instfiles/xrdp.service
+++ b/instfiles/xrdp.service
-@@ -1,13 +1,17 @@
- [Unit]
- Description=xrdp daemon
-+Documentation=man:xrdp(8) man:xrdp.ini(5)
- Requires=xrdp-sesman.service
--After=syslog.target network.target xrdp-sesman.service
-+After=network.target xrdp-sesman.service
+@@ -6,9 +6,12 @@ After=network.target xrdp-sesman.service
[Service]
Type=forking
diff --git a/debian/rules b/debian/rules
index c2edc6f..e2dfce2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,7 +20,8 @@ CONFIGURE_ARGS:= --build=${DEB_BUILD_GNU_TYPE} \
--libdir=\$${prefix}/lib/${DEB_HOST_MULTIARCH} \
--libexecdir=\$${prefix}/lib/${DEB_HOST_MULTIARCH} \
--disable-maintainer-mode \
- --disable-dependency-tracking
+ --disable-dependency-tracking \
+ --with-socketdir=/var/run/xrdp/sockdir
ifneq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE})
CONFIGURE_ARGS+= --host=${DEB_HOST_GNU_TYPE}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-remote/xrdp.git
More information about the pkg-remote-commits
mailing list