File: 06_move_serverauthfile_into_tmp.diff

package info (click to toggle)
xinit 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 1,120 kB
  • sloc: sh: 4,169; ansic: 1,165; cpp: 502; makefile: 137
file content (22 lines) | stat: -rw-r--r-- 745 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Move startx auth files in /tmp so they are removed on reboot.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
The trap patch didn't seem to work on reboot.
---
 startx.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/startx.cpp
+++ b/startx.cpp
@@ -278,11 +278,11 @@ if [ x"$enable_xauth" = x1 ] ; then
         exit 1
     fi
     dummy=0
 
     XCOMM create a file with auth information for the server. ':0' is a dummy.
-    xserverauthfile=$HOME/.serverauth.$$
+    xserverauthfile=`mktemp --tmpdir serverauth.XXXXXXXXXX`
     trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
     xauth -q -f "$xserverauthfile" << EOF
 add :$dummy . $mcookie
 EOF
 #if defined(__APPLE__) || defined(__CYGWIN__)