summaryrefslogtreecommitdiffstats
path: root/net-misc/xrdp/files
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-07-28 23:05:13 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-07-28 23:05:13 +0200
commit27645271741816b974166b4263724c323b897bbd (patch)
tree67ef2c950137ec25b75a1842a61133b24f0ca639 /net-misc/xrdp/files
parentchirp (diff)
downloadg-27645271741816b974166b4263724c323b897bbd.tar
g-27645271741816b974166b4263724c323b897bbd.tar.gz
g-27645271741816b974166b4263724c323b897bbd.tar.bz2
g-27645271741816b974166b4263724c323b897bbd.tar.lz
g-27645271741816b974166b4263724c323b897bbd.tar.xz
g-27645271741816b974166b4263724c323b897bbd.tar.zst
g-27645271741816b974166b4263724c323b897bbd.zip
Diffstat (limited to '')
-rw-r--r--net-misc/xrdp/files/startwm.sh13
-rw-r--r--net-misc/xrdp/files/xrdp-gcc8.patch15
-rw-r--r--net-misc/xrdp/files/xrdp-initd28
-rw-r--r--net-misc/xrdp/files/xrdp-oscalls.patch38
-rw-r--r--net-misc/xrdp/files/xrdp-sesman.pamd4
5 files changed, 98 insertions, 0 deletions
diff --git a/net-misc/xrdp/files/startwm.sh b/net-misc/xrdp/files/startwm.sh
new file mode 100644
index 0000000..751c26a
--- /dev/null
+++ b/net-misc/xrdp/files/startwm.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# try hard to respect Gentoo's wm choice
+. /etc/profile
+[ -f /etc/rc.conf ] && . /etc/rc.conf
+export XSESSION
+
+USERINITRC="$HOME/.xinitrc"
+if [ -f "$USERINITRC" ]; then
+ . "$USERINITRC"
+else
+ . /etc/X11/xinit/xinitrc
+fi
diff --git a/net-misc/xrdp/files/xrdp-gcc8.patch b/net-misc/xrdp/files/xrdp-gcc8.patch
new file mode 100644
index 0000000..d6c94ae
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-gcc8.patch
@@ -0,0 +1,15 @@
+--- a/common/log.c 2020-08-31 09:56:09.995682785 +0200
++++ b/common/log.c 2020-08-26 04:32:21.000000000 +0200
+@@ -555,9 +555,10 @@
+ now_t = time(&now_t);
+ now = localtime(&now_t);
+
+- snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
++ if (snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
+ now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
+- now->tm_sec);
++ now->tm_sec) < 0)
++ *buff = '\0';
+
+ internal_log_lvl2str(lvl, buff + 20);
+
diff --git a/net-misc/xrdp/files/xrdp-initd b/net-misc/xrdp/files/xrdp-initd
new file mode 100644
index 0000000..8f943e1
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net logger
+}
+
+start() {
+ ebegin "Starting X remote desktop daemon"
+ start-stop-daemon --start --pidfile /var/run/xrdp.pid --exec /usr/sbin/xrdp > /dev/null
+ eend $? || return $?
+
+ ebegin "Starting remote desktop session manager"
+ start-stop-daemon --start --pidfile /var/run/xrdp-sesman.pid --exec /usr/sbin/xrdp-sesman > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping X remote desktop daemon"
+ start-stop-daemon --stop --pidfile /var/run/xrdp.pid
+ eend $?
+
+ ebegin "Stopping remote desktop session manager"
+ start-stop-daemon --stop --pidfile /var/run/xrdp-sesman.pid
+ eend $?
+}
diff --git a/net-misc/xrdp/files/xrdp-oscalls.patch b/net-misc/xrdp/files/xrdp-oscalls.patch
new file mode 100644
index 0000000..95a9565
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-oscalls.patch
@@ -0,0 +1,38 @@
+--- a/common/os_calls.h 2020-06-26 13:13:58.000000000 +0200
++++ b/common/os_calls.h 2020-12-28 15:03:43.000000000 +0100
+@@ -119,6 +119,26 @@
+ int g_remove_dir(const char* dirname);
+ int g_file_delete(const char* filename);
+ int g_file_get_size(const char* filename);
++int g_strlen(const char* text);
++const char *g_strchr(const char *text, int c);
++char* g_strcpy(char* dest, const char* src);
++char* g_strncpy(char* dest, const char* src, int len);
++char* g_strcat(char* dest, const char* src);
++char* g_strdup(const char* in);
++char* g_strndup(const char* in, const unsigned int maxlen);
++int g_strcmp(const char* c1, const char* c2);
++int g_strncmp(const char* c1, const char* c2, int len);
++int g_strncmp_d(const char* c1, const char* c2, const char delim, int len);
++int g_strcasecmp(const char* c1, const char* c2);
++int g_strncasecmp(const char* c1, const char* c2, int len);
++int g_atoi(const char* str);
++int g_htoi(char* str);
++int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
++ int bytes_out_str);
++int g_pos(const char* str, const char* to_find);
++int g_mbstowcs(twchar* dest, const char* src, int n);
++int g_wcstombs(char* dest, const twchar* src, int n);
++int g_strtrim(char* str, int trim_flags);
+ long g_load_library(char* in);
+ int g_free_library(long lib);
+ void* g_get_proc_address(long lib, const char* name);
+@@ -160,6 +179,7 @@
+ int g_time3(void);
+ int g_save_to_bmp(const char* filename, char* data, int stride_bytes,
+ int width, int height, int depth, int bits_per_pixel);
++int g_text2bool(const char *s);
+ void * g_shmat(int shmid);
+ int g_shmdt(const void *shmaddr);
+ int g_gethostname(char *name, int len);
+
diff --git a/net-misc/xrdp/files/xrdp-sesman.pamd b/net-misc/xrdp/files/xrdp-sesman.pamd
new file mode 100644
index 0000000..4712aa8
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-sesman.pamd
@@ -0,0 +1,4 @@
+auth include system-remote-login
+account include system-remote-login
+password include system-remote-login
+session include system-remote-login