summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/session.c')
-rw-r--r--crypto/openssh/session.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c
index e21cd8e..42cc981 100644
--- a/crypto/openssh/session.c
+++ b/crypto/openssh/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.274 2014/07/15 15:54:14 millert Exp $ */
+/* $OpenBSD: session.c,v 1.277 2015/01/16 06:40:12 deraadt Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -61,6 +61,7 @@ __RCSID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "openbsd-compat/sys-queue.h"
#include "xmalloc.h"
@@ -1449,7 +1450,7 @@ static void
safely_chroot(const char *path, uid_t uid)
{
const char *cp;
- char component[MAXPATHLEN];
+ char component[PATH_MAX];
struct stat st;
if (*path != '/')
@@ -1632,11 +1633,11 @@ launch_login(struct passwd *pw, const char *hostname)
static void
child_close_fds(void)
{
- extern AuthenticationConnection *auth_conn;
+ extern int auth_sock;
- if (auth_conn) {
- ssh_close_authentication_connection(auth_conn);
- auth_conn = NULL;
+ if (auth_sock != -1) {
+ close(auth_sock);
+ auth_sock = -1;
}
if (packet_get_connection_in() == packet_get_connection_out())
@@ -2660,7 +2661,7 @@ session_setup_x11fwd(Session *s)
debug("X11 forwarding disabled in server configuration file.");
return 0;
}
- if (!options.xauth_location ||
+ if (options.xauth_location == NULL ||
(stat(options.xauth_location, &st) == -1)) {
packet_send_debug("No xauth program; cannot forward with spoofing.");
return 0;
OpenPOWER on IntegriCloud