- djm@cvs.openbsd.org 2004/09/23 13:00:04

[ssh.c]
     correctly honour -n in multiplex client mode; spotted by sturm@ ok markus@
This commit is contained in:
Darren Tucker 2004-11-05 20:19:51 +11:00
parent f30e1acc62
commit 39207a46b4
2 changed files with 15 additions and 3 deletions

View File

@ -29,6 +29,9 @@
- deraadt@cvs.openbsd.org 2004/09/15 18:46:04 - deraadt@cvs.openbsd.org 2004/09/15 18:46:04
[scp.c] [scp.c]
scratch that do { } while (0) wrapper in this case scratch that do { } while (0) wrapper in this case
- djm@cvs.openbsd.org 2004/09/23 13:00:04
[ssh.c]
correctly honour -n in multiplex client mode; spotted by sturm@ ok markus@
20041102 20041102
- (dtucker) [configure.ac includes.h] Bug #947: Fix compile error on HP-UX - (dtucker) [configure.ac includes.h] Bug #947: Fix compile error on HP-UX
@ -1808,4 +1811,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3569 2004/11/05 09:10:02 dtucker Exp $ $Id: ChangeLog,v 1.3570 2004/11/05 09:19:51 dtucker Exp $

13
ssh.c
View File

@ -40,7 +40,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: ssh.c,v 1.227 2004/09/15 00:46:01 deraadt Exp $"); RCSID("$OpenBSD: ssh.c,v 1.228 2004/09/23 13:00:04 djm Exp $");
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/err.h> #include <openssl/err.h>
@ -1249,11 +1249,20 @@ static void
control_client(const char *path) control_client(const char *path)
{ {
struct sockaddr_un addr; struct sockaddr_un addr;
int i, r, sock, exitval, num_env, addr_len; int i, r, fd, sock, exitval, num_env, addr_len;
Buffer m; Buffer m;
char *cp; char *cp;
extern char **environ; extern char **environ;
if (stdin_null_flag) {
if ((fd = open(_PATH_DEVNULL, O_RDONLY)) == -1)
fatal("open(/dev/null): %s", strerror(errno));
if (dup2(fd, STDIN_FILENO) == -1)
fatal("dup2: %s", strerror(errno));
if (fd > STDERR_FILENO)
close(fd);
}
memset(&addr, '\0', sizeof(addr)); memset(&addr, '\0', sizeof(addr));
addr.sun_family = AF_UNIX; addr.sun_family = AF_UNIX;
addr_len = offsetof(struct sockaddr_un, sun_path) + addr_len = offsetof(struct sockaddr_un, sun_path) +