- up to 0.6.1 auto/th/xrdp-0.6.1-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 7 Dec 2013 20:09:24 +0000 (21:09 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 7 Dec 2013 20:09:24 +0000 (21:09 +0100)
- fix format string errors
- fix build with heimdal krb5
- other small fixes
- updated configs and init script

build.patch [new file with mode: 0644]
format-security.patch [new file with mode: 0644]
heimdal.patch [new file with mode: 0644]
link.patch [new file with mode: 0644]
xrdp-make.patch [deleted file]
xrdp-paths.patch [deleted file]
xrdp-signals.patch [deleted file]
xrdp.init
xrdp.sesman.ini
xrdp.spec
xrdp.xrdp.ini

diff --git a/build.patch b/build.patch
new file mode 100644 (file)
index 0000000..78662ea
--- /dev/null
@@ -0,0 +1,11 @@
+--- xrdp-v0.6.1/sesman/tools/Makefile.am~      2013-11-09 21:11:15.000000000 +0100
++++ xrdp-v0.6.1/sesman/tools/Makefile.am       2013-12-07 18:41:21.172980720 +0100
+@@ -20,7 +20,7 @@
+ xrdp_sesrun_SOURCES = \
+   sesrun.c \
+   tcp.c \
+-  config.c
++  ../config.c
+ xrdp_sestest_SOURCES = \
+   sestest.c
diff --git a/format-security.patch b/format-security.patch
new file mode 100644 (file)
index 0000000..f8a1d66
--- /dev/null
@@ -0,0 +1,11 @@
+--- xrdp-v0.6.1/common/log.c~  2013-11-09 21:11:15.000000000 +0100
++++ xrdp-v0.6.1/common/log.c   2013-12-07 18:38:21.836315352 +0100
+@@ -160,7 +160,7 @@
+   if (l_cfg->enable_syslog  && (lvl <= l_cfg->log_level))
+   {
+     /* log to syslog */
+-    syslog(log_xrdp2syslog(lvl), buff + 20);
++    syslog(log_xrdp2syslog(lvl), "%s", buff + 20);
+   }
+   if (lvl <= l_cfg->log_level)
diff --git a/heimdal.patch b/heimdal.patch
new file mode 100644 (file)
index 0000000..80f3750
--- /dev/null
@@ -0,0 +1,42 @@
+--- xrdp-v0.6.1/sesman/verify_user_kerberos.c~ 2013-11-09 21:11:15.000000000 +0100
++++ xrdp-v0.6.1/sesman/verify_user_kerberos.c  2013-12-07 19:01:56.670626777 +0100
+@@ -187,11 +187,15 @@
+   u_info = (struct user_info*)data;
+   rc = 0;
++#ifndef HEIMDAL
+   types = krb5_get_prompt_types(ctx);
++#endif
+   for (i = 0; i < num_prompts; i++)
+   {
++#ifndef HEIMDAL
+     if (types[i] == KRB5_PROMPT_TYPE_PASSWORD ||
+         types[i] == KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN)
++#endif
+     {
+       g_strncpy(prompts[i].reply->data, u_info->pass, 255);
+     }
+@@ -214,7 +214,11 @@
+   krb5_creds my_creds;
+   krb5_error_code code = 0;
+   krb5_get_init_creds_opt options;
++#ifdef HEIMDAL
++  krb5_addresses* addresses;
++#else
+   krb5_address** addresses;
++#endif
+   krb5_get_init_creds_opt_init(&options);
+   g_memset(&my_creds, 0, sizeof(my_creds));
+@@ -245,7 +249,11 @@
+   if (opts->addresses)
+   {
+     addresses = NULL;
++#ifdef HEIMDAL
++    code = krb5_get_all_client_addrs(k5->ctx, addresses);
++#else
+     code = krb5_os_localaddr(k5->ctx, &addresses);
++#endif
+     if (code != 0)
+     {
+       g_printf("krb5_os_localaddr failed in k5_kinit\n");
diff --git a/link.patch b/link.patch
new file mode 100644 (file)
index 0000000..44a9c5f
--- /dev/null
@@ -0,0 +1,9 @@
+--- xrdp-v0.6.1/common/Makefile.am~    2013-11-09 21:11:15.000000000 +0100
++++ xrdp-v0.6.1/common/Makefile.am     2013-12-07 20:09:12.855037515 +0100
+@@ -23,4 +23,5 @@
+ libcommon_la_LIBADD = \
+   -lcrypto \
+   -lssl \
+-  -lpthread
++  -lpthread \
++  -ldl
diff --git a/xrdp-make.patch b/xrdp-make.patch
deleted file mode 100644 (file)
index a0b3a79..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur xrdp-0.4.0/xrdp/Makefile xrdp-0.4.0.new/xrdp/Makefile
---- xrdp-0.4.0/xrdp/Makefile   2007-04-13 05:50:59.000000000 +0200
-+++ xrdp-0.4.0.new/xrdp/Makefile       2008-04-24 17:16:43.000000000 +0200
-@@ -18,7 +18,7 @@
- CFLAGS = -Wall -O2 -I../common -I../libxrdp $(DEFINES)
- #CFLAGS += -DXRDP_DEBUG
- C_OS_FLAGS = $(CFLAGS) -c
--LDFLAGS = -L/usr/gnu/lib -L../libxrdp -Wl,-rpath,.
-+LDFLAGS += -L/usr/gnu/lib -L../libxrdp -Wl,-rpath,.
- LIBS = -ldl -lpthread -lxrdp
- CC = gcc
diff --git a/xrdp-paths.patch b/xrdp-paths.patch
deleted file mode 100644 (file)
index 42c1d5c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Naur xrdp-0.4.0/xrdp/xrdp_font.c xrdp-0.4.0.new/xrdp/xrdp_font.c
---- xrdp-0.4.0/xrdp/xrdp_font.c        2007-01-12 05:47:18.000000000 +0100
-+++ xrdp-0.4.0.new/xrdp/xrdp_font.c    2008-04-20 03:14:52.000000000 +0200
-@@ -79,7 +79,7 @@
-   self->wm = wm;
-   make_stream(s);
-   init_stream(s, 8192 * 2);
--  fd = g_file_open("Tahoma-10.fv1");
-+  fd = g_file_open("/usr/share/xrdp/Tahoma-10.fv1");
-   if (fd != -1)
-   {
-     b = g_file_read(fd, s->data, 8192 * 2);
-diff -Naur xrdp-0.4.0/xrdp/xrdp_login_wnd.c xrdp-0.4.0.new/xrdp/xrdp_login_wnd.c
---- xrdp-0.4.0/xrdp/xrdp_login_wnd.c   2007-05-06 08:50:45.000000000 +0200
-+++ xrdp-0.4.0.new/xrdp/xrdp_login_wnd.c       2008-04-20 03:14:06.000000000 +0200
-@@ -461,7 +461,7 @@
-   /* image */
-   but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self);
--  xrdp_bitmap_load(but, "xrdp256.bmp", self->palette);
-+  xrdp_bitmap_load(but, "/usr/share/xrdp/xrdp256.bmp", self->palette);
-   but->parent = self->screen;
-   but->owner = self->screen;
-   but->left = self->screen->width - but->width;
-@@ -470,7 +470,7 @@
-   /* image */
-   but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self);
--  xrdp_bitmap_load(but, "ad256.bmp", self->palette);
-+  xrdp_bitmap_load(but, "/usr/share/xrdp/ad256.bmp", self->palette);
-   but->parent = self->login_window;
-   but->owner = self->login_window;
-   but->left = 10;
-diff -Naur xrdp-0.4.0/xrdp/xrdp_wm.c xrdp-0.4.0.new/xrdp/xrdp_wm.c
---- xrdp-0.4.0/xrdp/xrdp_wm.c  2007-05-18 05:49:21.000000000 +0200
-+++ xrdp-0.4.0.new/xrdp/xrdp_wm.c      2008-04-20 03:14:06.000000000 +0200
-@@ -328,11 +328,11 @@
-   struct xrdp_pointer_item pointer_item;
-   DEBUG(("sending cursor"));
--  xrdp_wm_load_pointer(self, "cursor1.cur", pointer_item.data,
-+  xrdp_wm_load_pointer(self, "/usr/share/xrdp/cursor1.cur", pointer_item.data,
-                        pointer_item.mask, &pointer_item.x, &pointer_item.y);
-   xrdp_cache_add_pointer_static(self->cache, &pointer_item, 1);
-   DEBUG(("sending cursor"));
--  xrdp_wm_load_pointer(self, "cursor0.cur", pointer_item.data,
-+  xrdp_wm_load_pointer(self, "/usr/share/xrdp/cursor0.cur", pointer_item.data,
-                        pointer_item.mask, &pointer_item.x, &pointer_item.y);
-   xrdp_cache_add_pointer_static(self->cache, &pointer_item, 0);
-   return 0;
diff --git a/xrdp-signals.patch b/xrdp-signals.patch
deleted file mode 100644 (file)
index 4dfa40b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur xrdp-0.4.1.orig/sesman/session.c xrdp-0.4.1/sesman/session.c
---- xrdp-0.4.1.orig/sesman/session.c   2007-05-28 01:30:34.000000000 +0200
-+++ xrdp-0.4.1/sesman/session.c        2008-09-10 15:01:42.000000000 +0200
-@@ -237,7 +237,7 @@
-   }
-   else if (pid == 0) /* child sesman */
-   {
--    g_unset_signals();
-+    /* g_unset_signals(); */
-     auth_start_session(data, display);
-     g_sprintf(geometry, "%dx%d", width, height);
-     g_sprintf(depth, "%d", bpp);
index 5994fadbb6b3071b0e060f8e8c1ebe9b3762ffe1..eccea19ecfc24dd870644d867ce74ad47ce116a8 100644 (file)
--- a/xrdp.init
+++ b/xrdp.init
@@ -23,8 +23,8 @@ start() {
                RETVAL_XRDP=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xrdp
 
-               msg_starting "sesman"
-               daemon sesman </dev/null
+               msg_starting "xrdp-sesman"
+               daemon xrdp-sesman </dev/null
                RETVAL_SESMAN=$?
                RETVAL=$RETVAL_XRDP$RETVAL_SESMAN
                if [ "$RETVAL" == "00" ]; then
@@ -32,8 +32,8 @@ start() {
                else
                  msg_stopping "xrdp"
                  killproc xrdp
-                 msg_stopping "sesman"
-                 killproc sesman
+                 msg_stopping "xrdp-sesman"
+                 killproc xrdp-sesman
                fi
        else
                msg_already_running "xrdp"
@@ -44,8 +44,8 @@ stop() {
        if [ -f /var/lock/subsys/xrdp ]; then
                msg_stopping "xrdp"
                killproc xrdp
-               msg_stopping "sesman"
-               killproc sesman
+               msg_stopping "xrdp-sesman"
+               killproc xrdp-sesman
                rm -f /var/lock/subsys/xrdp
        else
                msg_not_running "xrdp"
@@ -56,7 +56,7 @@ reload() {
        if [ -f /var/lock/subsys/xrdp ]; then
                msg_reloading "xrdp"
                killproc xrdp -HUP
-               killproc sesman -HUP
+               killproc xrdp-sesman -HUP
                RETVAL=$?
        else
                msg_not_running "xrdp"
@@ -78,10 +78,10 @@ RETVAL=0
 # See how we were called.
 case "$1" in
   start)
-       start
+       start
        ;;
   stop)
-       stop
+       stop
        ;;
   restart)
        stop
index 2c4758661252c3f9865942a57f4074af1c480a6f..e11b1611e82ac86eb9c5287e35c46bee9113640a 100644 (file)
@@ -12,6 +12,7 @@ TerminalServerUsers=users
 TerminalServerAdmins=root
 
 [Sessions]
+X11DisplayOffset=10
 MaxSessions=10
 KillDisconnected=0
 IdleTimeLimit=0
@@ -26,7 +27,14 @@ SyslogLevel=CORE
 [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 dcfde57a4c10b3854f5d0cf8c09133911ad91e72..aa654d7ec67672f03ccdc864933ef7ebf4f76f9c 100644 (file)
--- a/xrdp.spec
+++ b/xrdp.spec
@@ -1,32 +1,34 @@
-# NOTE:
-# - xrdp-signals.patch has been applied upstream in CVS, so it should be
-#   removed for xrdp > 0.4.1
-#
 Summary:       Remote desktop server
 Summary(pl.UTF-8):     Serwer remote desktop
 Name:          xrdp
-Version:       0.4.2
+Version:       0.6.1
 Release:       1
 License:       GPL
 Group:         X11/Applications/Networking
-Source0:       http://dl.sourceforge.net/xrdp/%{name}-%{version}.tar.gz
-# Source0-md5: e2eecc2a383e77e6cb087e837c4d4c10
+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.PLD
 Source6:       %{name}.README.PLD.pl
-Patch0:                %{name}-paths.patch
-Patch1:                %{name}-make.patch
-Patch2:                %{name}-signals.patch
+Patch0:                format-security.patch
+Patch1:                build.patch
+Patch2:                heimdal.patch
+Patch3:                link.patch
 URL:           http://xrdp.sourceforge.net/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: freerdp-devel
+BuildRequires: heimdal-devel >= 1.5.3-4
+BuildRequires: libtool
 BuildRequires: openssl-devel
 BuildRequires: pam-devel
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
+Requires:      /usr/bin/Xvnc
 Requires:      rc-scripts
-Requires:      tightvnc-server
 Requires:      xinitrc-ng
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -48,51 +50,40 @@ klientami protokołu rdp Microsoftu.
 xrdp używa jako backendu Xvnc lub X11rdp.
 
 %prep
-%setup -q
+%setup -q -n %{name}-v%{version}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 install %{SOURCE5} README.PLD
 install %{SOURCE6} README.PLD.pl
 awk '{gsub("LIBDIR","%{_libdir}"); print}' < %{SOURCE3} > xrdp.ini
 
 %build
-%{__make} \
-       CC="%{__cc}"
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+export CFLAGS="%{rpmcflags} -DHEIMDAL"
+%configure \
+       --enable-kerberos \
+       --enable-freerdp1
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/xrdp,%{_sbindir},%{_docdir},%{_localstatedir}/run,%{_datadir}/%{name}} \
-       $RPM_BUILD_ROOT%{_mandir}/man{5,8} \
-       $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},pam.d,rc.d/init.d} \
-       $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},pam.d,rc.d/init.d}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/xrdp
 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/sesman
 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/sesman.ini
-install xrdp.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/xrdp.ini
-install libxrdp/libxrdp.so $RPM_BUILD_ROOT%{_libdir}/libxrdp.so
-install rdp/librdp.so $RPM_BUILD_ROOT%{_libdir}/xrdp/librdp.so
-install sesman/sessvc $RPM_BUILD_ROOT%{_sbindir}/sessvc
-install sesman/sesman $RPM_BUILD_ROOT%{_sbindir}/sesman
-install sesman/startwm.sh $RPM_BUILD_ROOT%{_sbindir}/startwm.sh
-install sesman/libscp/libscp.so $RPM_BUILD_ROOT%{_libdir}/libscp.so
-install sesman/tools/sesrun $RPM_BUILD_ROOT%{_sbindir}/sesrun
-install sesman/tools/sestest $RPM_BUILD_ROOT%{_sbindir}/sestest
-install vnc/libvnc.so $RPM_BUILD_ROOT%{_libdir}/xrdp/libvnc.so
-install xrdp/xrdp $RPM_BUILD_ROOT%{_sbindir}/xrdp
-install xrdp/ad256.bmp $RPM_BUILD_ROOT%{_datadir}/%{name}/ad256.bmp
-install xrdp/xrdp256.bmp $RPM_BUILD_ROOT%{_datadir}/%{name}/xrdp256.bmp
-install xrdp/cursor0.cur $RPM_BUILD_ROOT%{_datadir}/%{name}/cursor0.cur
-install xrdp/cursor1.cur $RPM_BUILD_ROOT%{_datadir}/%{name}/cursor1.cur
-install xrdp/Tahoma-10.fv1 $RPM_BUILD_ROOT%{_datadir}/%{name}/Tahoma-10.fv1
-install xrdp/rsakeys.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/rsakeys.ini
-install xup/libxup.so $RPM_BUILD_ROOT%{_libdir}/xrdp/libxup.so
-install docs/man/sesman.8 $RPM_BUILD_ROOT%{_mandir}/man8/sesman.8
-install docs/man/sesrun.8 $RPM_BUILD_ROOT%{_mandir}/man8/sesrun.8
-install docs/man/xrdp.8 $RPM_BUILD_ROOT%{_mandir}/man8/xrdp.8
-install docs/man/sesman.ini.5 $RPM_BUILD_ROOT%{_mandir}/man5/sesman.ini.5
-install docs/man/xrdp.ini.5 $RPM_BUILD_ROOT%{_mandir}/man5/xrdp.ini.5
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib*.{a,la,so}
 
 %post
 /sbin/ldconfig
@@ -116,17 +107,47 @@ rm -rf $RPM_BUILD_ROOT
 %doc *.txt
 %doc README.PLD
 %doc README.PLD.pl
-%dir %{_sysconfdir}/%{name}
-%dir %{_localstatedir}/run
-%{_libdir}/libscp.so
-%{_libdir}/libxrdp.so
-%{_libdir}/xrdp
-%{_datadir}/xrdp
-%attr(755,root,root) %{_sbindir}/*
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/sesman
 %attr(754,root,root) /etc/rc.d/init.d/xrdp
+%dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/xrdp.ini
 %config(noreplace) %{_sysconfdir}/%{name}/rsakeys.ini
 %config(noreplace) %{_sysconfdir}/%{name}/sesman.ini
-%{_mandir}/man8/*
-%{_mandir}/man5/*
+%{_sysconfdir}/%{name}/km-0407.ini
+%{_sysconfdir}/%{name}/km-0409.ini
+%{_sysconfdir}/%{name}/km-040c.ini
+%{_sysconfdir}/%{name}/km-0410.ini
+%{_sysconfdir}/%{name}/km-0419.ini
+%{_sysconfdir}/%{name}/km-041d.ini
+%attr(755,root,root) %{_bindir}/xrdp-dis
+%attr(755,root,root) %{_bindir}/xrdp-genkeymap
+%attr(755,root,root) %{_bindir}/xrdp-keygen
+%attr(755,root,root) %{_bindir}/xrdp-sesadmin
+%attr(755,root,root) %{_bindir}/xrdp-sesrun
+%attr(755,root,root) %{_bindir}/xrdp-sestest
+%attr(755,root,root) %{_sbindir}/xrdp
+%attr(755,root,root) %{_sbindir}/xrdp-chansrv
+%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.*
+%dir %{_datadir}/xrdp
+%{_datadir}/xrdp/ad24b.bmp
+%{_datadir}/xrdp/ad256.bmp
+%{_datadir}/xrdp/cursor0.cur
+%{_datadir}/xrdp/cursor1.cur
+%{_datadir}/xrdp/sans-10.fv1
+%{_datadir}/xrdp/xrdp24b.bmp
+%{_datadir}/xrdp/xrdp256.bmp
+%{_mandir}/man5/sesman.ini.5*
+%{_mandir}/man5/xrdp.ini.5*
+%{_mandir}/man8/xrdp-sesman.8*
+%{_mandir}/man8/xrdp-sesrun.8*
+%{_mandir}/man8/xrdp.8*
index 1769b3d13aab8c6761faae3e9b3a03de4692f0ba..8217a8c35ddaf807b88859fb92c81cd40afe4c73 100644 (file)
@@ -5,6 +5,16 @@ 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
@@ -45,9 +55,18 @@ 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
This page took 0.131721 seconds and 4 git commands to generate.