summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshd.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-02-28 19:40:24 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-02-28 19:40:24 +0000
commitcc565a5756cc8aec8fb67238ca5fedf3277b3d47 (patch)
treea4130df6819f8ab78ee870bc693f9c797be62b31 /usr.bin/ssh/sshd.c
parentb3b14b8063227ea6d8b4d6cba39a58004752780f (diff)
create x11 cookie file
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r--usr.bin/ssh/sshd.c5
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 */