diff options
author | 2000-02-28 19:40:23 +0000 | |
---|---|---|
committer | 2000-02-28 19:40:23 +0000 | |
commit | 9d1913568c77b9a88ecbe4b1cbc107ce087624ea (patch) | |
tree | 21b27ae16144a02fdd6da4e4f429f73792f0d5e0 | |
parent | Optimized fdalloc as in Banga and Mogul paper: (diff) | |
download | wireguard-openbsd-9d1913568c77b9a88ecbe4b1cbc107ce087624ea.tar.xz wireguard-openbsd-9d1913568c77b9a88ecbe4b1cbc107ce087624ea.zip |
create x11 cookie file
-rw-r--r-- | usr.bin/ssh/sshd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 6cea307ebbd..236b08c3bce 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -11,7 +11,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.88 2000/02/15 16:52:57 markus Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.89 2000/02/28 19:40:23 markus Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -1755,8 +1755,9 @@ do_authenticated(struct passwd * pw) xauthfile = NULL; goto fail; } - restore_uid(); strlcat(xauthfile, "/cookies", MAXPATHLEN); + open(xauthfile, O_RDWR|O_CREAT|O_EXCL, 0600); + restore_uid(); fatal_add_cleanup(xauthfile_cleanup_proc, NULL); break; #else /* XAUTH_PATH */ |