upgrade to 0.9.0

This commit is contained in:
Itamar Reis Peixoto 2015-07-15 14:34:45 -03:00
parent a51d30a142
commit 310bc7685a
16 changed files with 66 additions and 617 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ xrdp-cvs-03-17-2010.tar.gz
/xrdp-cvs-03-17-2010.tar.gz
/xrdp-HEAD-a9cfc23.tar.gz
/xrdp-v0.6.1.tar.gz
/xrdp-0.9.0.tar.gz

View File

@ -1 +1 @@
26099c6588943262023607c1b4e774d8 xrdp-v0.6.1.tar.gz
abbd55939c6340de39fd38eb7ebede3a xrdp-0.9.0.tar.gz

View File

@ -1,22 +0,0 @@
diff -ruN xrdp-v0.6.1-orig/sesman/chansrv/clipboard.c xrdp-v0.6.1/sesman/chansrv/clipboard.c
--- xrdp-v0.6.1-orig/sesman/chansrv/clipboard.c 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/sesman/chansrv/clipboard.c 2014-04-01 19:12:32.513364604 +1100
@@ -29,6 +29,7 @@
#include "parse.h"
#include "os_calls.h"
#include "chansrv.h"
+#include "clipboard.h"
static Atom g_clipboard_atom = 0;
static Atom g_clip_property_atom = 0;
diff -ruN xrdp-v0.6.1-orig/xrdp/xrdp_mm.c xrdp-v0.6.1/xrdp/xrdp_mm.c
--- xrdp-v0.6.1-orig/xrdp/xrdp_mm.c 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/xrdp/xrdp_mm.c 2014-04-01 19:11:19.743442077 +1100
@@ -21,6 +21,7 @@
*/
#include "xrdp.h"
+#include <string.h>
/*****************************************************************************/
struct xrdp_mm* APP_CC

View File

@ -1,16 +0,0 @@
diff -ruN xrdp-v0.6.1-orig/common/os_calls.c xrdp-v0.6.1/common/os_calls.c
--- xrdp-v0.6.1-orig/common/os_calls.c 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/common/os_calls.c 2014-04-01 18:29:15.585633769 +1100
@@ -567,10 +567,10 @@
{
struct sockaddr_in s;
struct in_addr in;
- int len;
+ socklen_t len;
int ip_port;
- memset(&s,0,sizeof(&s));
+ memset(&s,0,sizeof(s));
len = sizeof(s);
getpeername(rcv_sck,(struct sockaddr*)&s, &len);

View File

@ -1,35 +0,0 @@
diff -ruN xrdp-v0.6.1-vanilla/sesman/sesman.ini xrdp-v0.6.1/sesman/sesman.ini
--- xrdp-v0.6.1-vanilla/sesman/sesman.ini 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/sesman/sesman.ini 2015-06-04 16:14:59.939912226 +1000
@@ -3,7 +3,7 @@
ListenPort=3350
EnableUserWindowManager=1
UserWindowManager=startwm.sh
-DefaultWindowManager=startwm.sh
+DefaultWindowManager=startwm-bash.sh
[Security]
AllowRootLogin=1
@@ -26,15 +26,13 @@
[X11rdp]
param1=-bs
-param2=-ac
-param3=-nolisten
-param4=tcp
+param2=-nolisten
+param3=tcp
[Xvnc]
param1=-bs
-param2=-ac
-param3=-nolisten
-param4=tcp
-param5=-localhost
-param6=-dpi
-param7=96
+param2=-nolisten
+param3=tcp
+param4=-localhost
+param5=-dpi
+param6=96

View File

@ -1,12 +0,0 @@
diff -ruN xrdp-v0.6.1-orig/common/log.c xrdp-v0.6.1/common/log.c
--- xrdp-v0.6.1-orig/common/log.c 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/common/log.c 2014-04-01 17:54:49.005574821 +1100
@@ -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)

View File

@ -1,27 +0,0 @@
diff -ruN xrdp-v0.6.1-vanilla/vnc/vnc.c xrdp-v0.6.1/vnc/vnc.c
--- xrdp-v0.6.1-vanilla/vnc/vnc.c 2013-11-10 07:11:15.000000000 +1100
+++ xrdp-v0.6.1/vnc/vnc.c 2014-12-22 17:49:57.474144440 +1100
@@ -846,6 +846,7 @@
int error;
int i;
int check_sec_result;
+ int count;
v->server_msg(v, "started connecting", 0);
check_sec_result = 1;
@@ -870,7 +871,14 @@
v->sck_closed = 0;
g_sprintf(text, "connecting to %s %s", v->ip, con_port);
v->server_msg(v, text, 0);
- error = g_tcp_connect(v->sck, v->ip, con_port);
+
+ for (count = 0; count < 10; count++) {
+ error = g_tcp_connect(v->sck, v->ip, con_port);
+ if (error == 0)
+ break;
+ g_sleep(1000);
+ }
+
if (error == 0)
{
v->server_msg(v, "tcp connected", 0);

View File

@ -1,17 +0,0 @@
diff -up xrdp-HEAD-a9cfc23/common/arch.h.endian xrdp-HEAD-a9cfc23/common/arch.h
--- xrdp-HEAD-a9cfc23/common/arch.h.endian 2010-11-04 16:52:27.000000000 +0100
+++ xrdp-HEAD-a9cfc23/common/arch.h 2013-01-29 12:31:13.000000000 +0100
@@ -24,10 +24,12 @@
#if !defined(ARCH_H)
#define ARCH_H
+#include <endian.h>
+
#if !(defined(L_ENDIAN) || defined(B_ENDIAN))
/* check endianess */
#if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || \
- defined(__hppa__)
+ defined(__hppa__) || (BYTE_ORDER == BIG_ENDIAN)
#define B_ENDIAN
#else
#define L_ENDIAN

View File

@ -1,19 +0,0 @@
diff -ruNp a/xrdp/instfiles/pam.d/xrdp-sesman b/xrdp/instfiles/pam.d/xrdp-sesman
--- a/xrdp/instfiles/pam.d/xrdp-sesman 2009-09-20 16:06:14.000000000 -0300
+++ b/xrdp/instfiles/pam.d/xrdp-sesman 2009-09-16 16:39:16.000000000 -0300
@@ -1,4 +1,12 @@
#%PAM-1.0
-auth required pam_unix.so shadow nullok
-auth required pam_env.so readenv=1
-account required pam_unix.so
+# Generic Fedora config
+auth include password-auth
+account include password-auth
+password include password-auth
+session include password-auth
+
+# Gnome specific Fedora config
+#auth include gdm-password
+#account include gdm-password
+#password include gdm-password
+#session include gdm-password

View File

@ -1,229 +0,0 @@
diff --git a/sesman/auth.h b/sesman/auth.h
index a6c5e7f..86bfc96 100644
--- a/sesman/auth.h
+++ b/sesman/auth.h
@@ -58,6 +58,16 @@ auth_start_session(long in_val, int in_display);
*
*/
int DEFAULT_CC
+auth_stop_session(long in_val);
+
+/**
+ *
+ * @brief FIXME
+ * @param in_val
+ * @return 0 on success, 1 on failure
+ *
+ */
+int DEFAULT_CC
auth_end(long in_val);
/**
diff --git a/sesman/session.c b/sesman/session.c
index 36262ad..24e40d1 100644
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -310,7 +310,7 @@ session_start_fork(int width, int height, int bpp, char* username,
{
int display = 0;
int pid = 0;
- int wmpid = 0;
+ int wmpid = 0, pampid = 0;
int xpid = 0;
int i = 0;
char geometry[32];
@@ -369,7 +369,6 @@ session_start_fork(int width, int height, int bpp, char* username,
}
else if (pid == 0) /* child sesman */
{
- auth_start_session(data, display);
g_sprintf(geometry, "%dx%d", width, height);
g_sprintf(depth, "%d", bpp);
g_sprintf(screen, ":%d", display);
@@ -380,80 +379,94 @@ session_start_fork(int width, int height, int bpp, char* username,
else if (wmpid == 0) /* child (child sesman) xserver */
{
wait_for_xserver(display);
- env_set_user(username, 0, display);
- if (x_server_running(display))
+ auth_start_session(data, display);
+ pampid = g_fork();
+ if(pampid == -1)
{
- auth_set_env(data);
- if (directory != 0)
+ }
+ else if (pampid == 0) /* child: X11/client */
+ {
+ env_set_user(username, 0, display);
+ if (x_server_running(display))
{
- if (directory[0] != 0)
+ auth_set_env(data);
+ if (directory != 0)
{
- g_set_current_dir(directory);
+ if (directory[0] != 0)
+ {
+ g_set_current_dir(directory);
+ }
}
- }
- if (program != 0)
- {
- if (program[0] != 0)
+ if (program != 0)
{
- g_execlp3(program, program, 0);
- log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,
- "error starting program %s for user %s - pid %d",
- program, username, g_getpid());
+ if (program[0] != 0)
+ {
+ g_execlp3(program, program, 0);
+ log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,
+ "error starting program %s for user %s - pid %d",
+ program, username, g_getpid());
+ }
}
- }
- /* try to execute user window manager if enabled */
- if (g_cfg->enable_user_wm)
- {
- g_sprintf(text,"%s/%s", g_getenv("HOME"), g_cfg->user_wm);
- if (g_file_exist(text))
+ /* try to execute user window manager if enabled */
+ if (g_cfg->enable_user_wm)
{
- g_execlp3(text, g_cfg->user_wm, 0);
- log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,"error starting user "
- "wm for user %s - pid %d", username, g_getpid());
- /* logging parameters */
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "errno: %d, "
- "description: %s", errno, g_get_strerror());
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG,"execlp3 parameter "
- "list:");
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[0] = %s",
- text);
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[1] = %s",
- g_cfg->user_wm);
+ g_sprintf(text,"%s/%s", g_getenv("HOME"), g_cfg->user_wm);
+ if (g_file_exist(text))
+ {
+ g_execlp3(text, g_cfg->user_wm, 0);
+ log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,"error starting user "
+ "wm for user %s - pid %d", username, g_getpid());
+ /* logging parameters */
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "errno: %d, "
+ "description: %s", errno, g_get_strerror());
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG,"execlp3 parameter "
+ "list:");
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[0] = %s",
+ text);
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[1] = %s",
+ g_cfg->user_wm);
+ }
}
+ /* if we're here something happened to g_execlp3
+ so we try running the default window manager */
+ g_sprintf(text, "%s/%s", XRDP_CFG_PATH, g_cfg->default_wm);
+ g_execlp3(text, g_cfg->default_wm, 0);
+
+ log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,"error starting default "
+ "wm for user %s - pid %d", username, g_getpid());
+ /* logging parameters */
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "errno: %d, description: "
+ "%s", errno, g_get_strerror());
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG,"execlp3 parameter list:");
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[0] = %s",
+ text);
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[1] = %s",
+ g_cfg->default_wm);
+
+ /* still a problem starting window manager just start xterm */
+ g_execlp3("xterm", "xterm", 0);
+
+ /* should not get here */
+ log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,"error starting xterm "
+ "for user %s - pid %d", username, g_getpid());
+ /* logging parameters */
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "errno: %d, description: "
+ "%s", errno, g_get_strerror());
}
- /* if we're here something happened to g_execlp3
- so we try running the default window manager */
- g_sprintf(text, "%s/%s", XRDP_CFG_PATH, g_cfg->default_wm);
- g_execlp3(text, g_cfg->default_wm, 0);
-
- log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,"error starting default "
- "wm for user %s - pid %d", username, g_getpid());
- /* logging parameters */
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "errno: %d, description: "
- "%s", errno, g_get_strerror());
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG,"execlp3 parameter list:");
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[0] = %s",
- text);
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, " argv[1] = %s",
- g_cfg->default_wm);
-
- /* still a problem starting window manager just start xterm */
- g_execlp3("xterm", "xterm", 0);
-
- /* should not get here */
- log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS,"error starting xterm "
- "for user %s - pid %d", username, g_getpid());
- /* logging parameters */
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "errno: %d, description: "
- "%s", errno, g_get_strerror());
+ else
+ {
+ log_message(&(g_cfg->log), LOG_LEVEL_ERROR, "another Xserver is "
+ "already active on display %d", display);
+ }
+ log_message(&(g_cfg->log), LOG_LEVEL_DEBUG,"aborting connection...");
+ g_exit(0);
}
else
{
- log_message(&(g_cfg->log), LOG_LEVEL_ERROR, "another Xserver is "
- "already active on display %d", display);
+ g_waitpid(pampid);
+ auth_stop_session(data);
+ g_exit(0);
}
- log_message(&(g_cfg->log), LOG_LEVEL_DEBUG,"aborting connection...");
- g_exit(0);
}
else /* parent (child sesman) */
{
diff --git a/sesman/verify_user_pam.c b/sesman/verify_user_pam.c
index e3d8596..54aaeaa 100644
--- a/sesman/verify_user_pam.c
+++ b/sesman/verify_user_pam.c
@@ -173,6 +173,26 @@ auth_start_session(long in_val, int in_display)
/******************************************************************************/
/* returns error */
+int DEFAULT_CC
+auth_stop_session(long in_val)
+{
+ struct t_auth_info* auth_info;
+ int error;
+
+ auth_info = (struct t_auth_info*)in_val;
+ error = pam_close_session(auth_info->ph, 0);
+ if (error != PAM_SUCCESS)
+ {
+ g_printf("pam_close_session failed: %s\r\n",
+ pam_strerror(auth_info->ph, error));
+ return 1;
+ }
+ auth_info->session_opened = 0;
+ return 0;
+}
+
+/******************************************************************************/
+/* returns error */
/* cleanup */
int DEFAULT_CC
auth_end(long in_val)

12
xrdp-sesman.pamd Normal file
View File

@ -0,0 +1,12 @@
#%PAM-1.0
# Generic Fedora config
auth include password-auth
account include password-auth
password include password-auth
session include password-auth
# Gnome specific Fedora config
#auth include gdm-password
#account include gdm-password
#password include gdm-password
#session include gdm-password

View File

@ -1,13 +0,0 @@
[Unit]
Description=xrdp session manager
BindsTo=xrdp.service
Wants=network-online.target nss-lookup.target nss-user-lookup.target
After=network-online.target nss-lookup.target nss-user-lookup.target
StopWhenUnneeded=true
[Service]
EnvironmentFile=/etc/sysconfig/xrdp
ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --nodaemon
[Install]
WantedBy=multi-user.target

View File

@ -1,17 +0,0 @@
diff -ruNp a/xrdp-HEAD-a9cfc23/sesman/startwm.sh b/xrdp-HEAD-a9cfc23/sesman/startwm.sh
--- a/xrdp-HEAD-a9cfc23/sesman/startwm.sh 2010-11-04 13:52:27.000000000 -0200
+++ b/xrdp-HEAD-a9cfc23/sesman/startwm.sh 2010-11-18 01:08:01.275689981 -0200
@@ -1,5 +1,13 @@
#!/bin/sh
+# if xinitrc exists use it instead, it should load user prefferences
+# including desktop environment specified in /etc/sysconfig/desktop
+if [ -f /etc/X11/xinit/xinitrc ]
+then
+ . /etc/X11/xinit/xinitrc
+ exit 0
+fi
+
# change the order in line below to run to run whatever window manager you
# want, default to kde

144
xrdp.init
View File

@ -1,144 +0,0 @@
#!/bin/sh
#
# xrdp Open source remote desktop protocol (RDP) server
#
# chkconfig: - 64 36
# description: Open source remote desktop protocol (RDP) server
#
### BEGIN INIT INFO
# Provides: xrdp
# Required-Start: $network
# Required-Stop: $network
# Should-Start: $network
# Should-Stop: $network
# Default-Start:
# Default-Stop:
# Short-Description: Starts the xrdp daemon
# Description: Open source remote desktop protocol (RDP) server
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
[ -e /etc/sysconfig/xrdp ] && . /etc/sysconfig/xrdp
start_xrdp() {
exec="/usr/sbin/xrdp"
prog="xrdp"
lockfile=/var/lock/subsys/xrdp
[ -x $exec ] || exit 5
echo -n $"Starting $prog: "
daemon "$exec $XRDP_OPTIONS >> /dev/null"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop_xrdp() {
prog="xrdp"
lockfile=/var/lock/subsys/xrdp
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
start_sesman() {
exec="/usr/sbin/xrdp-sesman"
prog="xrdp-sesman"
lockfile=/var/lock/subsys/xrdp-sesman
[ -x $exec ] || exit 5
echo -n $"Starting $prog: "
daemon "$exec $SESMAN_OPTIONS >> /dev/null"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop_sesman() {
prog="xrdp-sesman"
lockfile=/var/lock/subsys/xrdp-sesman
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
start() {
start_xrdp
start_sesman
}
stop() {
stop_xrdp
stop_sesman
}
restart() {
stop_xrdp
stop_sesman
start_xrdp
start_sesman
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
prog="xrdp"
status $prog
prog="xrdp-sesman"
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

View File

@ -1,11 +0,0 @@
[Unit]
Description=xrdp daemon
Requires=xrdp-sesman.service
After=xrdp-sesman.service
[Service]
EnvironmentFile=/etc/sysconfig/xrdp
ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS --nodaemon
[Install]
WantedBy=multi-user.target

106
xrdp.spec
View File

@ -1,29 +1,14 @@
Summary: Open source remote desktop protocol (RDP) server
Name: xrdp
Epoch: 1
Version: 0.6.1
Release: 11%{?dist}
Version: 0.9.0
Release: 1%{?dist}
License: GPLv2+ with exceptions
Group: Applications/Internet
URL: http://xrdp.sourceforge.net/
Source0: http://sourceforge.net/projects/xrdp/files/xrdp/%{version}/xrdp-v%{version}.tar.gz
Patch0: xrdp-pam-auth.patch
Patch1: xrdp-use-xinitrc-in-startwm-sh.patch
Patch2: xrdp-pam_session.patch
# https://sourceforge.net/tracker/?group_id=112022&atid=665248
# https://bugzilla.redhat.com/show_bug.cgi?id=905411
Patch3: xrdp-endian.patch
Patch4: xrdp-0.6.1-syslog-format.patch
Patch5: xrdp-0.6.1-memset.patch
Patch6: xrdp-0.6.1-implicit-decl.patch
Patch7: xrdp-0.6.1-vnc-delay.patch
Patch8: xrdp-0.6.1-sesman-ini.patch
Source1: xrdp.service
Source2: xrdp-sesman.service
Source3: xrdp.sysconfig
Source4: xrdp.logrotate
Source0: http://sourceforge.net/projects/xrdp/files/xrdp/%{version}/xrdp-%{version}.tar.gz
Source1: xrdp-sesman.pamd
Source2: xrdp.sysconfig
Source3: xrdp.logrotate
BuildRequires: pam-devel
BuildRequires: openssl-devel
@ -32,15 +17,18 @@ BuildRequires: automake
BuildRequires: libtool
Buildrequires: libX11-devel
BuildRequires: libXfixes-devel
BuildRequires: systemd-units
BuildRequires: libXrandr-devel
BuildRequires: systemd
#vnc-server provides Xvnc (tigervnc-server in fedora)
Requires: tigervnc-server-minimal
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd
Requires(post): systemd-sysv
Requires(preun): systemd
Requires(postun): systemd
%description
The goal of this project is to provide a fully functional Linux terminal
@ -48,20 +36,21 @@ server, capable of accepting connections from rdesktop and Microsoft's own
terminal server / remote desktop clients.
%prep
#%setup -q -n %{name}-%{version}
%setup -q -n %{name}-v%{version}
%patch0 -p2
%patch1 -p2
%patch2 -p1
%patch3 -p1 -b .endian
%patch4 -p1 -b .syslog-format
%patch5 -p1 -b .memset
%patch6 -p1 -b .implicit-decl
%patch7 -p1 -b .vnc-delay
%patch8 -p1 -b .sesman-ini
%setup -q -n %{name}-%{version}
# remove unused modules from xrdp login combobox
%{__sed} -i -e '/\[xrdp2\]/,$d' xrdp/xrdp.ini
%{__sed} -i -e '/\[xrdp1\]/,$d' xrdp/xrdp.ini
echo "
[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
delay_ms=2000
" >> xrdp/xrdp.ini
#Low is 40 bit key and everything from client to server is encrypted.
#Medium is 40 bit key, everything both ways is encrypted.
@ -77,7 +66,7 @@ echo '#!/bin/bash -l
%build
./bootstrap
%configure
%configure --enable-ipv6
%{__make} %{?_smp_mflags}
%install
@ -89,38 +78,37 @@ find %{buildroot} -name '*.a' -exec rm {} \;
find %{buildroot} -name '*.la' -exec rm {} \;
#install sesman pam config /etc/pam.d/xrdp-sesman
%{__install} -Dp -m 644 instfiles/pam.d/xrdp-sesman %{buildroot}%{_sysconfdir}/pam.d/xrdp-sesman
#installx xrdp systemd units
%{__install} -Dp -m 644 %{SOURCE1} %{buildroot}/lib/systemd/system/xrdp.service
%{__install} -Dp -m 644 %{SOURCE2} %{buildroot}/lib/systemd/system/xrdp-sesman.service
%{__install} -Dp -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/xrdp-sesman
#install xrdp sysconfig /etc/sysconfig/xrdp
%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/xrdp
%{__install} -Dp -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/xrdp
#install logrotate /etc/logrotate.d/xrdp
%{__install} -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp
%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp
#install log file /var/log/xrdp-sesman.log
%{__mkdir} -p %{buildroot}%{_localstatedir}/log/
touch %{buildroot}%{_localstatedir}/log/xrdp-sesman.log
# rsakeys.ini
touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
%{__chmod} 0600 %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
#install 'bash -l' startwm script
%{__install} -Dp -m 755 sesman/startwm-bash.sh %{buildroot}%{_sysconfdir}/xrdp/startwm-bash.sh
#rsakeys.ini
touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
%{__chmod} 0600 %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
%post
%systemd_post xrdp.service
xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini > /dev/null
%{__chmod} 0600 %{_sysconfdir}/xrdp/rsakeys.ini
%preun
%systemd_preun xrdp.service
%postun
%systemd_postun_with_restart xrdp.service
%systemd_postun_with_restart xrdp.service
%triggerun -- xrdp < 0.6.0-1
systemd-sysv-convert --save xrdp >/dev/null 2>&1 ||:
@ -141,18 +129,19 @@ fi
%dir %{_libdir}/xrdp
%dir %{_sysconfdir}/xrdp
%dir %{_datadir}/xrdp
%config(noreplace) %{_sysconfdir}/xrdp/sesman.ini
%config(noreplace) %{_sysconfdir}/xrdp/xrdp.ini
%config(noreplace) %{_sysconfdir}/pam.d/xrdp-sesman
%config(noreplace) %{_sysconfdir}/logrotate.d/xrdp
%config(noreplace) %{_sysconfdir}/sysconfig/xrdp
%config(noreplace) %{_sysconfdir}/xrdp/sesman.ini
%{_sysconfdir}/xrdp/*.sh
%{_sysconfdir}/xrdp/km*.ini
%{_sysconfdir}/xrdp/xrdp_keyboard.ini
%{_bindir}/xrdp-genkeymap
%{_bindir}/xrdp-sesadmin
%{_bindir}/xrdp-keygen
%{_bindir}/xrdp-sesrun
%{_bindir}/xrdp-sestest
# %{_bindir}/xrdp-sestest
%{_bindir}/xrdp-dis
%{_sbindir}/xrdp-chansrv
%{_sbindir}/xrdp
@ -165,8 +154,10 @@ fi
%{_datadir}/xrdp/sans-10.fv1
%{_datadir}/xrdp/ad24b.bmp
%{_datadir}/xrdp/xrdp24b.bmp
%{_datadir}/xrdp/xrdp_logo.bmp
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_mandir}/man1/*
%{_libdir}/xrdp/lib*.so.*
%{_libdir}/xrdp/libcommon.so
%{_libdir}/xrdp/libmc.so
@ -175,13 +166,20 @@ fi
%{_libdir}/xrdp/libvnc.so
%{_libdir}/xrdp/libxrdp.so
%{_libdir}/xrdp/libxup.so
/lib/systemd/system/xrdp-sesman.service
/lib/systemd/system/xrdp.service
%{_libdir}/xrdp/libxrdpapi.so
%{_sysconfdir}/xrdp/pulse/default.pa
%{_unitdir}/xrdp-sesman.service
%{_unitdir}/xrdp.service
%ghost %{_localstatedir}/log/xrdp-sesman.log
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini
%changelog
* Tue Jul 14 2015 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.9.0-1
- upgrade to 0.9.0
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.6.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild