From 4189258700ab2dadaacb6a37b0dc22b97658fb96 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Thu, 25 May 2006 13:17:17 +0200 Subject: [PATCH] using unpredictable wmii address and wmiirc' proglist due to mktemp (prevents some security concerns) --- cmd/wm/wmii | 5 +++-- rc/wmiirc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/wm/wmii b/cmd/wm/wmii index a1abe81f..36088ac7 100644 --- a/cmd/wm/wmii +++ b/cmd/wm/wmii @@ -3,12 +3,13 @@ wmiiwm -c || exit 1 +SOCKET=`mktemp /tmp/.wmii.address.$DISPLAY.XXXXXX` PATH=$PATH:$HOME/.wmii-4:CONFPREFIX/wmii-4 export PATH -WMII_ADDRESS=unix!/tmp/ns.$USER.$DISPLAY/wmii export WMII_ADDRESS +WMII_ADDRESS=unix!$SOCKET export WMII_ADDRESS -mkdir -m 700 /tmp/ns.$USER.$DISPLAY 2>/dev/null wmiiwm -a $WMII_ADDRESS & wmiiwmpid=$! mkdir $HOME/.wmii-4 2>/dev/null && welcome & wmiirc & wait $wmiiwmpid +rm -f $SOCKET diff --git a/rc/wmiirc b/rc/wmiirc index 48ba4746..6ac69827 100644 --- a/rc/wmiirc +++ b/rc/wmiirc @@ -51,7 +51,7 @@ EOF # MISC xsetroot -solid '#333333' status & -PROGS_FILE=/tmp/.wmiimenu.$USER.proglist +PROGS_FILE=`mktemp /tmp/.wmiimenu.proglist.XXXXXX` proglist `echo "$PATH" | tr : ' '` >$PROGS_FILE & # SHORTCUTS @@ -109,6 +109,7 @@ do Start) if test wmiirc = "$1" then + rm -f $PROGS_FILE exit fi;; BarClick)