aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-07 13:50:08 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-05-07 13:50:08 +0200
commit460ae57594f105eb2c8ce49c9b833858b5f578d3 (patch)
treea3dbb5534656f8e0c9736d48e3a54eecf2a9a0f1
parentbb65a764d622fa8698b773769c3af03c9220a07b (diff)
downloadlightdm-remote-session-freerdp2-460ae57594f105eb2c8ce49c9b833858b5f578d3.tar.gz
lightdm-remote-session-freerdp2-460ae57594f105eb2c8ce49c9b833858b5f578d3.tar.bz2
lightdm-remote-session-freerdp2-460ae57594f105eb2c8ce49c9b833858b5f578d3.zip
freerdp2-session: Unset AUTH_INFO_PASSWORD right after usage.
-rwxr-xr-xfreerdp2-session.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/freerdp2-session.in b/freerdp2-session.in
index 41aa15e..8b9a427 100755
--- a/freerdp2-session.in
+++ b/freerdp2-session.in
@@ -35,6 +35,7 @@ if [ -e "$socket" ]; then
sleep 1
# FIXME: get audio working... add /sound:sys:pulse to xfreerdp cmdline args...
+ (
echo "$AUTH_INFO_PASSWORD" | /usr/bin/xfreerdp /f \
/v:"${AUTH_INFO_HOST}" \
/u:"${AUTH_INFO_USER}" \
@@ -42,11 +43,19 @@ if [ -e "$socket" ]; then
/from-stdin \
-toggle-fullscreen \
\
- | logger -t lightdm-remote-session-freerdp2 --
+ | logger -t lightdm-remote-session-freerdp2 -- \
+ &
+
+ unset AUTH_INFO_PASSWORD
+
+ # wait for another second to give the xfreerdp process to settle in process list
+ sleep 1
+
+ USERID=$(id -u)
+ wait $(pgrep -u ${USERID} xfreerdp
# FIXME: possibly stop pulseaudio here with -k again (we have seen permissioned denied warnings, when doing this. Better approaches?)
- unset AUTH_INFO_PASSWORD
else
zenity --warning --text="Unable to locate FreeRDP socket"
fi;