--- /dev/null
+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
--- /dev/null
+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();
+
# 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
%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}
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
%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