From cc565a5756cc8aec8fb67238ca5fedf3277b3d47 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Mon, 28 Feb 2000 19:40:24 +0000 Subject: create x11 cookie file --- usr.bin/ssh/sshd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh') 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 */ -- cgit v1.2.3