Skip to content

Commit d6ce465

Browse files
committed
Source snapshot from Powershell/openssh-portable:latestw_all
1 parent 31e2813 commit d6ce465

File tree

109 files changed

+7207
-1654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+7207
-1654
lines changed

.skipped-commit-ids

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Commit IDs against the new CVS->GIT translation go here (and delete this line)
2+
3+
Old upstream tree:
4+
15
321065a95a7ccebdd5fd08482a1e19afbf524e35 Update DH groups
26
d4f699a421504df35254cf1c6f1a7c304fb907ca Remove 1k bit groups
37
aafe246655b53b52bc32c8a24002bc262f4230f7 Remove intermediate moduli

PROTOCOL.certkeys

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ DSA certificate
100100

101101
ECDSA certificate
102102

103-
string "[email protected]" |
104-
105-
103+
string "ecdsa-sha2-nistp256-cert-[email protected]" |
104+
"ecdsa-sha2-nistp384-cert-[email protected]" |
105+
"ecdsa-sha2-nistp521-cert-[email protected]"
106106
string nonce
107107
string curve
108108
string public_key
@@ -291,4 +291,4 @@ permit-user-rc empty Flag indicating that execution of
291291
of this script will not be permitted if
292292
this option is not present.
293293

294-
$OpenBSD: PROTOCOL.certkeys,v 1.12 2017/05/31 04:29:44 djm Exp $
294+
$OpenBSD: PROTOCOL.certkeys,v 1.13 2017/11/03 02:32:19 djm Exp $

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.0.22.0.{build}
1+
version: 0.0.23.0.{build}
22
image: Visual Studio 2015
33

44
branches:

auth-passwd.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
#include <sys/types.h>
4242

4343
#include <pwd.h>
44+
#ifdef WINDOWS
45+
#include <logonuser.h>
46+
#endif
4447
#include <stdio.h>
4548
#include <string.h>
4649
#include <stdarg.h>
@@ -245,8 +248,8 @@ int sys_auth_passwd(Authctxt *authctxt, const char *password)
245248
*tmp = L'\0';
246249
}
247250

248-
if (LogonUserW(user_utf16, udom_utf16, pwd_utf16, LOGON32_LOGON_NETWORK_CLEARTEXT,
249-
LOGON32_PROVIDER_DEFAULT, &token) == FALSE) {
251+
if (LogonUserExExWHelper(user_utf16, udom_utf16, pwd_utf16, LOGON32_LOGON_NETWORK_CLEARTEXT,
252+
LOGON32_PROVIDER_DEFAULT, NULL, &token, NULL, NULL, NULL, NULL) == FALSE) {
250253
if (GetLastError() == ERROR_PASSWORD_MUST_CHANGE)
251254
/*
252255
* TODO - need to add support to force password change

bitmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* $OpenBSD: bitmap.c,v 1.9 2017/10/20 01:56:39 djm Exp $ */
12
/*
23
* Copyright (c) 2015 Damien Miller <[email protected]>
34
*

bitmap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* $OpenBSD: bitmap.h,v 1.2 2017/10/20 01:56:39 djm Exp $ */
12
/*
23
* Copyright (c) 2015 Damien Miller <[email protected]>
34
*

channels.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: channels.c,v 1.375 2017/09/24 13:45:34 djm Exp $ */
1+
/* $OpenBSD: channels.c,v 1.376 2017/10/25 00:15:35 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <[email protected]>
44
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
@@ -1668,19 +1668,6 @@ port_open_helper(struct ssh *ssh, Channel *c, char *rtype)
16681668
free(local_ipaddr);
16691669
}
16701670

1671-
static void
1672-
channel_set_reuseaddr(int fd)
1673-
{
1674-
int on = 1;
1675-
1676-
/*
1677-
* Set socket options.
1678-
* Allow local port reuse in TIME_WAIT.
1679-
*/
1680-
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1)
1681-
error("setsockopt SO_REUSEADDR fd %d: %s", fd, strerror(errno));
1682-
}
1683-
16841671
void
16851672
channel_set_x11_refuse_time(struct ssh *ssh, u_int refuse_time)
16861673
{
@@ -3370,7 +3357,7 @@ channel_setup_fwd_listener_tcpip(struct ssh *ssh, int type,
33703357
continue;
33713358
}
33723359

3373-
channel_set_reuseaddr(sock);
3360+
set_reuseaddr(sock);
33743361
if (ai->ai_family == AF_INET6)
33753362
sock_set_v6only(sock);
33763363

@@ -4443,7 +4430,7 @@ x11_create_display_inet(struct ssh *ssh, int x11_display_offset,
44434430
if (ai->ai_family == AF_INET6)
44444431
sock_set_v6only(sock);
44454432
if (x11_use_localhost)
4446-
channel_set_reuseaddr(sock);
4433+
set_reuseaddr(sock);
44474434
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
44484435
debug2("%s: bind port %d: %.100s", __func__,
44494436
port, strerror(errno));

cipher.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: cipher.c,v 1.107 2017/05/07 23:12:57 djm Exp $ */
1+
/* $OpenBSD: cipher.c,v 1.108 2017/11/03 02:22:41 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <[email protected]>
44
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
@@ -449,8 +449,8 @@ cipher_get_keyiv_len(const struct sshcipher_ctx *cc)
449449
int
450450
cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
451451
{
452-
const struct sshcipher *c = cc->cipher;
453452
#ifdef WITH_OPENSSL
453+
const struct sshcipher *c = cc->cipher;
454454
int evplen;
455455
#endif
456456

@@ -494,8 +494,8 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
494494
int
495495
cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
496496
{
497-
const struct sshcipher *c = cc->cipher;
498497
#ifdef WITH_OPENSSL
498+
const struct sshcipher *c = cc->cipher;
499499
int evplen = 0;
500500
#endif
501501

clientloop.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: clientloop.c,v 1.305 2017/09/19 04:24:22 djm Exp $ */
1+
/* $OpenBSD: clientloop.c,v 1.306 2017/10/23 05:08:00 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <[email protected]>
44
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
@@ -1605,23 +1605,25 @@ client_request_agent(struct ssh *ssh, const char *request_type, int rchan)
16051605
return c;
16061606
}
16071607

1608-
int
1608+
char *
16091609
client_request_tun_fwd(struct ssh *ssh, int tun_mode,
16101610
int local_tun, int remote_tun)
16111611
{
16121612
Channel *c;
16131613
int fd;
1614+
char *ifname = NULL;
16141615

16151616
if (tun_mode == SSH_TUNMODE_NO)
16161617
return 0;
16171618

16181619
debug("Requesting tun unit %d in mode %d", local_tun, tun_mode);
16191620

16201621
/* Open local tunnel device */
1621-
if ((fd = tun_open(local_tun, tun_mode)) == -1) {
1622+
if ((fd = tun_open(local_tun, tun_mode, &ifname)) == -1) {
16221623
error("Tunnel device open failed.");
1623-
return -1;
1624+
return NULL;
16241625
}
1626+
debug("Tunnel forwarding using interface %s", ifname);
16251627

16261628
c = channel_new(ssh, "tun", SSH_CHANNEL_OPENING, fd, fd, -1,
16271629
CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
@@ -1642,7 +1644,7 @@ client_request_tun_fwd(struct ssh *ssh, int tun_mode,
16421644
packet_put_int(remote_tun);
16431645
packet_send();
16441646

1645-
return 0;
1647+
return ifname;
16461648
}
16471649

16481650
/* XXXX move to generic input handler */

clientloop.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: clientloop.h,v 1.34 2017/09/12 06:32:07 djm Exp $ */
1+
/* $OpenBSD: clientloop.h,v 1.35 2017/10/23 05:08:00 djm Exp $ */
22

33
/*
44
* Author: Tatu Ylonen <[email protected]>
@@ -46,7 +46,7 @@ int client_x11_get_proto(struct ssh *, const char *, const char *,
4646
void client_global_request_reply_fwd(int, u_int32_t, void *);
4747
void client_session2_setup(struct ssh *, int, int, int,
4848
const char *, struct termios *, int, Buffer *, char **);
49-
int client_request_tun_fwd(struct ssh *, int, int, int);
49+
char *client_request_tun_fwd(struct ssh *, int, int, int);
5050
void client_stop_mux(void);
5151

5252
/* Escape filter for protocol 2 sessions */

configure.ac

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,16 @@ AC_CHECK_HEADERS([sys/capsicum.h], [], [], [
427427
#endif
428428
])
429429

430+
# net/route.h requires sys/socket.h and sys/types.h.
431+
# sys/sysctl.h also requires sys/param.h
432+
AC_CHECK_HEADERS([net/route.h sys/sysctl.h], [], [], [
433+
#ifdef HAVE_SYS_TYPES_H
434+
# include <sys/types.h>
435+
#endif
436+
#include <sys/param.h>
437+
#include <sys/socket.h>
438+
])
439+
430440
# lastlog.h requires sys/time.h to be included first on Solaris
431441
AC_CHECK_HEADERS([lastlog.h], [], [], [
432442
#ifdef HAVE_SYS_TIME_H
@@ -769,6 +779,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
769779
AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
770780
[Prepend the address family to IP tunnel traffic])
771781
fi
782+
AC_CHECK_HEADER([linux/if.h],
783+
AC_DEFINE([SYS_RDOMAIN_LINUX], [1],
784+
[Support routing domains using Linux VRF]))
772785
AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
773786
[], [#include <linux/types.h>])
774787
AC_MSG_CHECKING([for seccomp architecture])

0 commit comments

Comments
 (0)