diff options
author | Julien Cristau <jcristau@debian.org> | 2009-05-14 21:14:16 +0200 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2009-05-14 21:14:16 +0200 |
commit | ab5b900197966c25becdf9ad62861643749e01be (patch) | |
tree | ab049ae949e307b3f37caa3613b9c9ae948e65b7 /debian/local/xvfb-run | |
parent | ecf09e571198ee16256a5efd1c23fd286a4f2249 (diff) |
xvfb-run: use mktemp to create the temporary directory.
Diffstat (limited to 'debian/local/xvfb-run')
-rw-r--r-- | debian/local/xvfb-run | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/debian/local/xvfb-run b/debian/local/xvfb-run index b11130a32..4c2f4e0d3 100644 --- a/debian/local/xvfb-run +++ b/debian/local/xvfb-run @@ -147,12 +147,8 @@ trap clean_up EXIT # If the user did not specify an X authorization file to use, set up a temporary # directory to house one. if [ -z "$AUTHFILE" ]; then - XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$" - if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then - error "temporary directory $XVFB_RUN_TMPDIR already exists" - exit 4 - fi - AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority") + XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)" + AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority" fi # Start Xvfb. |