Bug#495311: /tmp as $HOME ?

2008-10-10 Thread Theppitak Karoonboonyanan
package xulrunner-1.9
tags 495311 patch
thanks

On Sat, Oct 11, 2008 at 10:40 AM, Theppitak Karoonboonyanan
<[EMAIL PROTECTED]> wrote:
> Is it right to touch any user's $HOME on installation, albeit root?
> How about using some temp dir as $HOME and clear it afterward?

Proposed patch against xulrunner1.9.postinst is attached. With this,
no .mozilla/ is left after postinst.

But it doesn't handle existing .mozilla/ with wrong permission yet,
though.

-- 
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/
--- xulrunner-1.9.postinst	2008-09-28 21:50:36.0 +0700
+++ xulrunner-1.9.postinst.mod	2008-10-11 10:46:27.0 +0700
@@ -8,9 +8,11 @@
 rm -f /usr/lib/xulrunner-1.9/components/compreg.dat \
   /usr/lib/xulrunner-1.9/components/xpti.dat
 cd /usr/lib/xulrunner-1.9
-./run-mozilla.sh ./xpcshell -e "" ||
+TMP_HOME=`mktemp -d`
+HOME=$TMP_HOME ./run-mozilla.sh ./xpcshell -e "" ||
 rm -f /usr/lib/xulrunner-1.9/components/compreg.dat \
   /usr/lib/xulrunner-1.9/components/xpti.dat
+rm -rf $TMP_HOME
 fi
 
 


Bug#495311: /tmp as $HOME ?

2008-10-10 Thread Theppitak Karoonboonyanan
Is it right to touch any user's $HOME on installation, albeit root?
How about using some temp dir as $HOME and clear it afterward?

For example,

TMPDIR=`mktemp -d`
HOME=$TMPDIR ./run-mozilla.sh run-mozilla.sh ./xpcshell -e "" || ...
rm -rf $TMPDIR

Regards,
-- 
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]