]> TLD Linux GIT Repositories - packages/xrdp.git/commitdiff
- patch original .ini files
authorMarcin Krol <hawk@tld-linux.org>
Wed, 26 Nov 2014 21:44:55 +0000 (21:44 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 26 Nov 2014 21:44:55 +0000 (21:44 +0000)
- added reuse session patch from ubuntu
- don't delete *.so, we are referencing them from config file
- no need to run ldconfig

config.patch [new file with mode: 0644]
reuse_session.patch [new file with mode: 0644]
xrdp.sesman.ini [deleted file]
xrdp.spec
xrdp.xrdp.ini [deleted file]

diff --git a/config.patch b/config.patch
new file mode 100644 (file)
index 0000000..bc42605
--- /dev/null
@@ -0,0 +1,64 @@
+diff -ur xrdp-v0.6.1.orig/sesman/sesman.ini xrdp-v0.6.1/sesman/sesman.ini
+--- xrdp-v0.6.1.orig/sesman/sesman.ini 2013-11-09 20:11:15.000000000 +0000
++++ xrdp-v0.6.1/sesman/sesman.ini      2014-11-26 19:19:47.000000000 +0000
+@@ -2,14 +2,14 @@
+ ListenAddress=127.0.0.1
+ ListenPort=3350
+ EnableUserWindowManager=1
+-UserWindowManager=startwm.sh
+-DefaultWindowManager=startwm.sh
++UserWindowManager=/etc/X11/xinit/Xclients
++DefaultWindowManager=/etc/X11/xinit/Xclients
+ [Security]
+ AllowRootLogin=1
+ MaxLoginRetry=4
+-TerminalServerUsers=tsusers
+-TerminalServerAdmins=tsadmins
++TerminalServerUsers=users
++TerminalServerAdmins=root
+ [Sessions]
+ X11DisplayOffset=10
+@@ -19,22 +19,22 @@
+ DisconnectedTimeLimit=0
+ [Logging]
+-LogFile=/var/log/xrdp-sesman.log
+-LogLevel=DEBUG
+-EnableSyslog=0
+-SyslogLevel=DEBUG
++LogFile=/dev/null
++LogLevel=INFO
++EnableSyslog=1
++SyslogLevel=INFO
+ [X11rdp]
+ param1=-bs
+ param2=-ac
+-param3=-nolisten
+-param4=tcp
++#param3=-nolisten
++#param4=tcp
+ [Xvnc]
+ param1=-bs
+ param2=-ac
+-param3=-nolisten
+-param4=tcp
+-param5=-localhost
+-param6=-dpi
+-param7=96
++#param3=-nolisten
++#param4=tcp
++#param5=-localhost
++#param6=-dpi
++#param7=96
+diff -ur xrdp-v0.6.1.orig/xrdp/xrdp.ini xrdp-v0.6.1/xrdp/xrdp.ini
+--- xrdp-v0.6.1.orig/xrdp/xrdp.ini     2013-11-09 20:11:15.000000000 +0000
++++ xrdp-v0.6.1/xrdp/xrdp.ini  2014-11-26 21:16:09.982000000 +0000
+@@ -1,4 +1,3 @@
+-
+ [globals]
+ bitmap_cache=yes
+ bitmap_compression=yes
diff --git a/reuse_session.patch b/reuse_session.patch
new file mode 100644 (file)
index 0000000..7d47ca9
--- /dev/null
@@ -0,0 +1,27 @@
+Allow to reuse an existing session by fixing a bug in session comparison.
+See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573258
+
+Index: xrdp/sesman/session.c
+===================================================================
+--- xrdp.orig/sesman/session.c 2012-09-29 12:51:50.115200445 +0200
++++ xrdp/sesman/session.c      2012-09-29 12:54:40.302890162 +0200
+@@ -56,6 +56,19 @@
+ {
+   struct session_chain* tmp;
++  /* convert from SCP_SESSION_TYPE namespace to SESMAN_SESSION_TYPE namespace */
++  switch (type)
++  {
++    case SCP_SESSION_TYPE_XVNC:
++      type = SESMAN_SESSION_TYPE_XVNC;
++      break;
++    case SCP_SESSION_TYPE_XRDP:
++      type = SESMAN_SESSION_TYPE_XRDP;
++      break;
++    default:
++      return 0;
++  }
++
+   /*THREAD-FIX require chain lock */
+   lock_chain_acquire();
diff --git a/xrdp.sesman.ini b/xrdp.sesman.ini
deleted file mode 100644 (file)
index 49c4987..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-[Globals]
-ListenAddress=127.0.0.1
-ListenPort=3350
-EnableUserWindowManager=1
-UserWindowManager=/etc/X11/xinit/Xclients
-DefaultWindowManager=/etc/X11/xinit/Xclients
-
-[Security]
-AllowRootLogin=1
-MaxLoginRetry=4
-TerminalServerUsers=users
-TerminalServerAdmins=root
-
-[Sessions]
-X11DisplayOffset=10
-MaxSessions=10
-KillDisconnected=0
-IdleTimeLimit=0
-DisconnectedTimeLimit=0
-
-[Logging]
-LogFile=/dev/null
-LogLevel=INFO
-EnableSyslog=1
-SyslogLevel=INFO
-
-[X11rdp]
-param1=-bs
-param2=-ac
-#param3=-nolisten
-#param4=tcp
-
-[Xvnc]
-param1=-bs
-param2=-ac
-#param3=-nolisten
-#param4=tcp
-#param5=-localhost
-#param6=-dpi
-#param7=96
index 5ed0c3c231a876d40d93ffedfb93d64601f06cab..f3f3a8e490cc2de050254a4c1e99470b03fb3b77 100644 (file)
--- a/xrdp.spec
+++ b/xrdp.spec
@@ -9,16 +9,16 @@ Source0:      http://download.sourceforge.net/xrdp/%{name}-v%{version}.tar.gz
 # Source0-md5: 26099c6588943262023607c1b4e774d8
 Source1:       %{name}.init
 Source2:       %{name}.pamd
-Source3:       %{name}.xrdp.ini
-Source4:       %{name}.sesman.ini
-Source5:       %{name}.README.TLD
-Source6:       %{name}.README.TLD.pl
+Source3:       %{name}.README.TLD
+Source4:       %{name}.README.TLD.pl
 Patch0:                format-security.patch
 Patch1:                build.patch
 Patch2:                link.patch
 Patch3:                quiet_start.patch
 Patch4:                default_keymap.patch
 Patch5:                pidfile_early.patch
+Patch6:                reuse_session.patch
+Patch7:                config.patch
 URL:           http://xrdp.sourceforge.net/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -58,10 +58,10 @@ xrdp używa jako backendu Xvnc lub X11rdp.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
-install %{SOURCE5} README.TLD
-install %{SOURCE6} README.TLD.pl
-awk '{gsub("LIBDIR","%{_libdir}"); print}' < %{SOURCE3} > xrdp/xrdp.ini
+install %{SOURCE3} README.TLD
+install %{SOURCE4} README.TLD.pl
 
 %build
 %{__libtoolize}
@@ -84,25 +84,18 @@ install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/xrdp
 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/sesman
 %{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xrdp-sesman
 %{__ln} -s sesman $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xrdp-sesman
-%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/sesman.ini
-install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/sesman.ini
-
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib*.{a,la,so}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib*.{a,la}
 
 %post
-/sbin/ldconfig
 /sbin/chkconfig --add xrdp
 %service xrdp restart "xrdp server"
 
-%postun -p /sbin/ldconfig
-
 %preun
 if [ "$1" = "0" ]; then
        %service xrdp stop
        /sbin/chkconfig --del xrdp
 fi
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -135,14 +128,14 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_sbindir}/xrdp-sesman
 %attr(755,root,root) %{_sbindir}/xrdp-sessvc
 %dir %{_libdir}/xrdp
-%attr(755,root,root) %{_libdir}/xrdp/libcommon.so.*
-%attr(755,root,root) %{_libdir}/xrdp/libmc.so.*
-%attr(755,root,root) %{_libdir}/xrdp/librdp.so.*
-%attr(755,root,root) %{_libdir}/xrdp/libscp.so.*
-%attr(755,root,root) %{_libdir}/xrdp/libvnc.so.*
-%attr(755,root,root) %{_libdir}/xrdp/libxrdp.so.*
-%attr(755,root,root) %{_libdir}/xrdp/libxrdpfreerdp1.so.*
-%attr(755,root,root) %{_libdir}/xrdp/libxup.so.*
+%attr(755,root,root) %{_libdir}/xrdp/libcommon.so*
+%attr(755,root,root) %{_libdir}/xrdp/libmc.so*
+%attr(755,root,root) %{_libdir}/xrdp/librdp.so*
+%attr(755,root,root) %{_libdir}/xrdp/libscp.so*
+%attr(755,root,root) %{_libdir}/xrdp/libvnc.so*
+%attr(755,root,root) %{_libdir}/xrdp/libxrdp.so*
+%attr(755,root,root) %{_libdir}/xrdp/libxrdpfreerdp1.so*
+%attr(755,root,root) %{_libdir}/xrdp/libxup.so*
 %dir %{_datadir}/xrdp
 %{_datadir}/xrdp/ad24b.bmp
 %{_datadir}/xrdp/ad256.bmp
diff --git a/xrdp.xrdp.ini b/xrdp.xrdp.ini
deleted file mode 100644 (file)
index 600baeb..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-[globals]
-bitmap_cache=yes
-bitmap_compression=yes
-port=3389
-crypt_level=low
-channel_code=1
-max_bpp=24
-#black=000000
-#grey=d6d3ce
-#dark_grey=808080
-#blue=08246b
-#dark_blue=08246b
-#white=ffffff
-#red=ff0000
-#green=00ff00
-#background=626c72
-
-[xrdp1]
-name=sesman-Xvnc
-lib=LIBDIR/xrdp/libvnc.so
-username=ask
-password=ask
-ip=127.0.0.1
-port=-1
-
-[xrdp2]
-name=console
-lib=LIBDIR/xrdp/libvnc.so
-ip=127.0.0.1
-port=5900
-username=na
-password=ask
-
-[xrdp3]
-name=vnc-any
-lib=LIBDIR/xrdp/libvnc.so
-ip=ask
-port=ask5900
-username=na
-password=ask
-
-[xrdp4]
-name=sesman-any
-lib=LIBDIR/xrdp/libvnc.so
-ip=ask
-port=-1
-username=ask
-password=ask
-
-[xrdp5]
-name=rdp-any
-lib=LIBDIR/xrdp/librdp.so
-ip=ask
-port=ask3389
-
-[xrdp6]
-name=freerdp-any
-lib=LIBDIR/xrdp/libxrdpfreerdp1.so
-ip=ask
-port=ask3389
-username=ask
-password=ask
-
-[xrdp7]
-name=sesman-X11rdp
-lib=LIBDIR/xrdp/libxup.so
-username=ask
-password=ask
-ip=127.0.0.1
-port=-1
-xserverbpp=24