Move scripts to /usr/libexec/xrdp, so that they get labelled as bin_t.

This commit is contained in:
Bojan Smojver 2017-04-11 11:16:53 +10:00
parent c89b807752
commit ba89333c84
2 changed files with 32 additions and 4 deletions

View File

@ -0,0 +1,21 @@
diff -ruN xrdp-0.9.2-vanilla/sesman/session.c xrdp-0.9.2/sesman/session.c
--- xrdp-0.9.2-vanilla/sesman/session.c 2017-03-30 17:18:55.000000000 +1100
+++ xrdp-0.9.2/sesman/session.c 2017-04-11 11:03:14.531999226 +1000
@@ -555,7 +555,7 @@
}
/* 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_sprintf(text, "%s/%s", "/usr/libexec/xrdp", g_cfg->default_wm);
g_execlp3(text, g_cfg->default_wm, 0);
log_message(LOG_LEVEL_ALWAYS, "error starting default "
@@ -852,7 +852,7 @@
display,
g_cfg->session_variables1,
g_cfg->session_variables2);
- g_snprintf(text, 255, "%s/%s", XRDP_CFG_PATH, "reconnectwm.sh");
+ g_snprintf(text, 255, "%s/%s", "/usr/libexec/xrdp", "reconnectwm.sh");
if (g_file_exist(text))
{

View File

@ -4,7 +4,7 @@ Summary: Open source remote desktop protocol (RDP) server
Name: xrdp
Epoch: 1
Version: 0.9.2
Release: 5%{?dist}
Release: 6%{?dist}
License: ASL 2.0
Group: Applications/Internet
URL: http://www.xrdp.org/
@ -18,6 +18,7 @@ Patch0: xrdp-0.9.2-sesman.patch
Patch1: xrdp-0.9.2-xrdp-ini.patch
Patch2: xrdp-0.9.2-service.patch
Patch3: xrdp-0.9.2-setpriv.patch
Patch4: xrdp-0.9.2-scripts-libexec.patch
BuildRequires: libX11-devel
BuildRequires: libXfixes-devel
@ -61,7 +62,7 @@ talk to xrdp.
# create 'bash -l' based startwm, to pick up PATH etc.
echo '#!/bin/bash -l
. %{_sysconfdir}/xrdp/startwm.sh' > sesman/startwm-bash.sh
. %{_libexecdir}/xrdp/startwm.sh' > sesman/startwm-bash.sh
%build
%configure --enable-fuse --enable-pixman --enable-painter
@ -83,7 +84,10 @@ echo '#!/bin/bash -l
%{__install} -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/xrdp/openssl.conf
#install 'bash -l' startwm script
%{__install} -Dp -m 755 sesman/startwm-bash.sh %{buildroot}%{_sysconfdir}/xrdp/startwm-bash.sh
%{__install} -Dp -m 755 sesman/startwm-bash.sh %{buildroot}%{_libexecdir}/xrdp/startwm-bash.sh
#move startwm script to libexec
%{__mv} -f %{buildroot}%{_sysconfdir}/xrdp/startwm.sh %{buildroot}%{_libexecdir}/xrdp/
%post
%systemd_post xrdp.service
@ -140,8 +144,8 @@ chmod 400 %{_sysconfdir}/xrdp/key.pem
%exclude %ghost %{_sysconfdir}/xrdp/rsakeys.ini
%{_sysconfdir}/xrdp/km*.ini
%{_sysconfdir}/xrdp/openssl.conf
%{_sysconfdir}/xrdp/startwm*.sh
%{_sysconfdir}/xrdp/xrdp_keyboard.ini
%{_libexecdir}/xrdp/startwm*.sh
%{_bindir}/xrdp-genkeymap
%{_bindir}/xrdp-sesadmin
%{_bindir}/xrdp-keygen
@ -191,6 +195,9 @@ chmod 400 %{_sysconfdir}/xrdp/key.pem
%{_libdir}/pkgconfig/rfxcodec.pc
%changelog
* Tue Apr 11 2017 Bojan Smojver <bojan@rexurive.com> - 1:0.9.2-6
- Move scripts to /usr/libexec/xrdp, so that they get labelled as bin_t
* Sat Apr 8 2017 Bojan Smojver <bojan@rexurive.com> - 1:0.9.2-5
- Rework call to Xorg to use setpriv instead, properly