Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix PCDMd to use a randomized authorization file name in the /tmp dir…

…ectory
  • Loading branch information...
commit 89cdf9c7832f365accd96f4433d29dab44d5107d 1 parent 2ec77c7
@beanpole135 beanpole135 authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src-qt4/PCDM/PCDMd
View
6 src-qt4/PCDM/PCDMd
@@ -4,7 +4,7 @@
#------------------------------------
PCDMCONF="/usr/local/etc/pcdm.conf"
-PCDMAUTHFILE="/tmp/.PCDMAuth"
+BASEPCDMAUTHFILE="/tmp/.PCDMAuth"
XOPTS=""
grep -q "^ENABLE_TCP_LISTEN=TRUE" ${PCDMCONF}
@@ -38,6 +38,8 @@ touch /tmp/.PCDMAutoLogin
# Now start the X Server
while [ ! -e /var/run/nologin ]; do
/usr/local/bin/pc-checkxdisplay
+ # Randomize the authorization file location
+ PCDMAUTHFILE=${BASEPCDMAUTHFILE}-`openssl rand -hex 10`
# Make sure the authorization file does not exist
if [ -f ${PCDMAUTHFILE} ]; then
rm ${PCDMAUTHFILE}
@@ -50,4 +52,6 @@ while [ ! -e /var/run/nologin ]; do
(sleep 10 ; $vnccmd >/var/log/vncserver 2>/var/log/vncserver) &
fi
xinit /usr/local/bin/PCDM-session -once -- :0 -auth ${PCDMAUTHFILE} $XOPTS
+ #Now remove the authorization file
+ rm ${PCDMAUTHFILE}
done
Please sign in to comment.
Something went wrong with that request. Please try again.