[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: l10n/scripts
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2006-02-13 10:04:21
Message-ID: 1139825061.127476.13385.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 508967 by goutte:
Create a temporary directory for temporaray files
(Reason: increased security)
M +22 -3 check_gui_texts
--- trunk/l10n/scripts/check_gui_texts #508966:508967
@@ -21,8 +21,27 @@
fi
### TODO: improve security
-TMPFILE=/tmp/seek.tmp-$$
+TMPDIR=`mktemp -d`
+if test ! -d "$TMPDIR"; then
+ echo "Cannot create temporary directory with mktemp, try manually"
+ TMPDIR=/tmp/seek-tmp.$$
+ if mkdir $TMPDIR; then
+ true;
+ else
+ echo "Creating $TMPDIR failed! Aborting!"
+ exit 10
+ fi
+ if test ! -d "$TMPDIR"; then
+ echo "Directory $TMPDIR was wrongly created! Aborting!"
+ exit 11
+ fi
+fi
+echo "Using temporary directory: $TMPDIR" # DEBUG
+
+TMPFILE=$TMPDIR/tmp
+
+
# Search the module this documentation belongs to
module=
for m in $modules; do
@@ -211,5 +230,5 @@
# Do housekeeping
-rm $TMPFILE-*
-exit 0
+rm $TMPDIR/*
+rmdir $TMPDIR
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic