diff options
author | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:50 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:50 +0100 |
commit | baccdb349b31c47cd76fb63211f754ed33a9707e (patch) | |
tree | d03653f975fd4eb8bf71bb0c9d168614401202fa /session.c | |
parent | 487bdb3a5ef6075887b830ccb8a0b14f6da78e93 (diff) | |
parent | 9f82e5a9042f2d872e98f48a876fcab3e25dd9bb (diff) |
Import openssh_6.8p1.orig.tar.gz
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.274 2014/07/15 15:54:14 millert Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.277 2015/01/16 06:40:12 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -60,6 +60,7 @@ | |||
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <unistd.h> | 62 | #include <unistd.h> |
63 | #include <limits.h> | ||
63 | 64 | ||
64 | #include "openbsd-compat/sys-queue.h" | 65 | #include "openbsd-compat/sys-queue.h" |
65 | #include "xmalloc.h" | 66 | #include "xmalloc.h" |
@@ -1437,7 +1438,7 @@ static void | |||
1437 | safely_chroot(const char *path, uid_t uid) | 1438 | safely_chroot(const char *path, uid_t uid) |
1438 | { | 1439 | { |
1439 | const char *cp; | 1440 | const char *cp; |
1440 | char component[MAXPATHLEN]; | 1441 | char component[PATH_MAX]; |
1441 | struct stat st; | 1442 | struct stat st; |
1442 | 1443 | ||
1443 | if (*path != '/') | 1444 | if (*path != '/') |
@@ -1620,11 +1621,11 @@ launch_login(struct passwd *pw, const char *hostname) | |||
1620 | static void | 1621 | static void |
1621 | child_close_fds(void) | 1622 | child_close_fds(void) |
1622 | { | 1623 | { |
1623 | extern AuthenticationConnection *auth_conn; | 1624 | extern int auth_sock; |
1624 | 1625 | ||
1625 | if (auth_conn) { | 1626 | if (auth_sock != -1) { |
1626 | ssh_close_authentication_connection(auth_conn); | 1627 | close(auth_sock); |
1627 | auth_conn = NULL; | 1628 | auth_sock = -1; |
1628 | } | 1629 | } |
1629 | 1630 | ||
1630 | if (packet_get_connection_in() == packet_get_connection_out()) | 1631 | if (packet_get_connection_in() == packet_get_connection_out()) |
@@ -2648,7 +2649,7 @@ session_setup_x11fwd(Session *s) | |||
2648 | debug("X11 forwarding disabled in server configuration file."); | 2649 | debug("X11 forwarding disabled in server configuration file."); |
2649 | return 0; | 2650 | return 0; |
2650 | } | 2651 | } |
2651 | if (!options.xauth_location || | 2652 | if (options.xauth_location == NULL || |
2652 | (stat(options.xauth_location, &st) == -1)) { | 2653 | (stat(options.xauth_location, &st) == -1)) { |
2653 | packet_send_debug("No xauth program; cannot forward with spoofing."); | 2654 | packet_send_debug("No xauth program; cannot forward with spoofing."); |
2654 | return 0; | 2655 | return 0; |