Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssh/dist merge conflicts between Ope...
details: https://anonhg.NetBSD.org/src/rev/e158c9b423bf
branches: trunk
changeset: 365224:e158c9b423bf
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 15 14:00:06 2022 +0000
description:
merge conflicts between OpenSSH-8.9 and OpenSSH-9.0
diffstat:
crypto/external/bsd/openssh/dist/PROTOCOL | 43 ++++-
crypto/external/bsd/openssh/dist/auth-rhosts.c | 7 +-
crypto/external/bsd/openssh/dist/auth2-pubkey.c | 10 +-
crypto/external/bsd/openssh/dist/channels.c | 228 ++++++++++++-----------
crypto/external/bsd/openssh/dist/channels.h | 6 +-
crypto/external/bsd/openssh/dist/misc.c | 31 ++-
crypto/external/bsd/openssh/dist/monitor.c | 15 +-
crypto/external/bsd/openssh/dist/myproposal.h | 6 +-
crypto/external/bsd/openssh/dist/scp.1 | 26 +-
crypto/external/bsd/openssh/dist/scp.c | 10 +-
crypto/external/bsd/openssh/dist/servconf.c | 13 +-
crypto/external/bsd/openssh/dist/servconf.h | 6 +-
crypto/external/bsd/openssh/dist/sftp-client.c | 126 ++++++++++++-
crypto/external/bsd/openssh/dist/sftp-client.h | 7 +-
crypto/external/bsd/openssh/dist/sftp-glob.c | 6 +-
crypto/external/bsd/openssh/dist/sftp-server.c | 98 ++++++++++-
crypto/external/bsd/openssh/dist/sftp.1 | 22 +-
crypto/external/bsd/openssh/dist/sftp.c | 25 +-
crypto/external/bsd/openssh/dist/ssh-agent.1 | 10 +-
crypto/external/bsd/openssh/dist/ssh-keygen.c | 13 +-
crypto/external/bsd/openssh/dist/ssh-keysign.8 | 8 +-
crypto/external/bsd/openssh/dist/ssh.1 | 12 +-
crypto/external/bsd/openssh/dist/ssh.c | 8 +-
crypto/external/bsd/openssh/dist/ssh_config.5 | 12 +-
crypto/external/bsd/openssh/dist/sshd.8 | 8 +-
crypto/external/bsd/openssh/dist/sshd.c | 35 ++-
crypto/external/bsd/openssh/dist/sshd_config.5 | 8 +-
crypto/external/bsd/openssh/dist/sshsig.c | 13 +-
crypto/external/bsd/openssh/dist/version.h | 8 +-
crypto/external/bsd/openssh/dist/xmalloc.c | 9 +-
30 files changed, 575 insertions(+), 254 deletions(-)
diffs (truncated from 1789 to 300 lines):
diff -r 5685895bdfd3 -r e158c9b423bf crypto/external/bsd/openssh/dist/PROTOCOL
--- a/crypto/external/bsd/openssh/dist/PROTOCOL Fri Apr 15 13:44:57 2022 +0000
+++ b/crypto/external/bsd/openssh/dist/PROTOCOL Fri Apr 15 14:00:06 2022 +0000
@@ -492,7 +492,7 @@
string "fsync%openssh.com@localhost"
string handle
-One receiving this request, a server will call fsync(handle_fd) and will
+On receiving this request, a server will call fsync(handle_fd) and will
respond with a SSH_FXP_STATUS message.
This extension is advertised in the SSH_FXP_VERSION hello with version
@@ -576,6 +576,43 @@
This extension is advertised in the SSH_FXP_VERSION hello with version
"1".
+4.10. sftp: Extension request "copy-data"
+
+This request asks the server to copy data from one open file handle and
+write it to a different open file handle. This avoids needing to transfer
+the data across the network twice (a download followed by an upload).
+
+ byte SSH_FXP_EXTENDED
+ uint32 id
+ string "copy-data"
+ string read-from-handle
+ uint64 read-from-offset
+ uint64 read-data-length
+ string write-to-handle
+ uint64 write-to-offset
+
+The server will copy read-data-length bytes starting from
+read-from-offset from the read-from-handle and write them to
+write-to-handle starting from write-to-offset, and then respond with a
+SSH_FXP_STATUS message.
+
+It's equivalent to issuing a series of SSH_FXP_READ requests on
+read-from-handle and a series of requests of SSH_FXP_WRITE on
+write-to-handle.
+
+If read-from-handle and write-to-handle are the same, the server will
+fail the request and respond with a SSH_FX_INVALID_PARAMETER message.
+
+If read-data-length is 0, then the server will read data from the
+read-from-handle until EOF is reached.
+
+This extension is advertised in the SSH_FXP_VERSION hello with version
+"1".
+
+This request is identical to the "copy-data" request documented in:
+
+https://tools.ietf.org/html/draft-ietf-secsh-filexfer-extensions-00#section-7
+
5. Miscellaneous changes
5.1 Public key format
@@ -612,5 +649,5 @@
OpenSSH extends the usual agent protocol. These changes are documented
in the PROTOCOL.agent file.
-$OpenBSD: PROTOCOL,v 1.43 2021/12/19 22:15:42 djm Exp $
-$NetBSD: PROTOCOL,v 1.18 2022/02/23 19:07:20 christos Exp $
+$OpenBSD: PROTOCOL,v 1.44 2022/03/31 03:05:49 djm Exp $
+$NetBSD: PROTOCOL,v 1.19 2022/04/15 14:00:06 christos Exp $
diff -r 5685895bdfd3 -r e158c9b423bf crypto/external/bsd/openssh/dist/auth-rhosts.c
--- a/crypto/external/bsd/openssh/dist/auth-rhosts.c Fri Apr 15 13:44:57 2022 +0000
+++ b/crypto/external/bsd/openssh/dist/auth-rhosts.c Fri Apr 15 14:00:06 2022 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: auth-rhosts.c,v 1.14 2022/02/23 19:07:20 christos Exp $ */
-/* $OpenBSD: auth-rhosts.c,v 1.55 2022/02/23 11:15:57 djm Exp $ */
+/* $NetBSD: auth-rhosts.c,v 1.15 2022/04/15 14:00:06 christos Exp $ */
+/* $OpenBSD: auth-rhosts.c,v 1.56 2022/02/23 21:21:49 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -16,7 +16,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: auth-rhosts.c,v 1.14 2022/02/23 19:07:20 christos Exp $");
+__RCSID("$NetBSD: auth-rhosts.c,v 1.15 2022/04/15 14:00:06 christos Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <unistd.h>
#include "packet.h"
diff -r 5685895bdfd3 -r e158c9b423bf crypto/external/bsd/openssh/dist/auth2-pubkey.c
--- a/crypto/external/bsd/openssh/dist/auth2-pubkey.c Fri Apr 15 13:44:57 2022 +0000
+++ b/crypto/external/bsd/openssh/dist/auth2-pubkey.c Fri Apr 15 14:00:06 2022 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: auth2-pubkey.c,v 1.30 2022/02/23 19:07:20 christos Exp $ */
-/* $OpenBSD: auth2-pubkey.c,v 1.112 2021/12/19 22:12:30 djm Exp $ */
+/* $NetBSD: auth2-pubkey.c,v 1.31 2022/04/15 14:00:06 christos Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.113 2022/02/27 01:33:59 naddy Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -25,7 +25,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: auth2-pubkey.c,v 1.30 2022/02/23 19:07:20 christos Exp $");
+__RCSID("$NetBSD: auth2-pubkey.c,v 1.31 2022/04/15 14:00:06 christos Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -171,8 +171,8 @@
goto done;
}
if (match_pattern_list(pkalg, options.pubkey_accepted_algos, 0) != 1) {
- logit_f("key type %s not in PubkeyAcceptedAlgorithms",
- sshkey_ssh_name(key));
+ logit_f("signature algorithm %s not in "
+ "PubkeyAcceptedAlgorithms", pkalg);
goto done;
}
if ((r = sshkey_check_cert_sigtype(key,
diff -r 5685895bdfd3 -r e158c9b423bf crypto/external/bsd/openssh/dist/channels.c
--- a/crypto/external/bsd/openssh/dist/channels.c Fri Apr 15 13:44:57 2022 +0000
+++ b/crypto/external/bsd/openssh/dist/channels.c Fri Apr 15 14:00:06 2022 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: channels.c,v 1.35 2022/02/23 19:07:20 christos Exp $ */
-/* $OpenBSD: channels.c,v 1.413 2022/02/17 10:58:27 djm Exp $ */
+/* $NetBSD: channels.c,v 1.36 2022/04/15 14:00:06 christos Exp $ */
+/* $OpenBSD: channels.c,v 1.415 2022/03/30 21:10:25 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -41,7 +41,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: channels.c,v 1.35 2022/02/23 19:07:20 christos Exp $");
+__RCSID("$NetBSD: channels.c,v 1.36 2022/04/15 14:00:06 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -432,21 +432,25 @@
c->io_want &= ~SSH_CHAN_IO_RFD;
c->io_ready &= ~SSH_CHAN_IO_RFD;
c->rfd = -1;
+ c->pfds[0] = -1;
}
if (*fdp == c->wfd) {
c->io_want &= ~SSH_CHAN_IO_WFD;
c->io_ready &= ~SSH_CHAN_IO_WFD;
c->wfd = -1;
+ c->pfds[1] = -1;
}
if (*fdp == c->efd) {
c->io_want &= ~SSH_CHAN_IO_EFD;
c->io_ready &= ~SSH_CHAN_IO_EFD;
c->efd = -1;
+ c->pfds[2] = -1;
}
if (*fdp == c->sock) {
c->io_want &= ~SSH_CHAN_IO_SOCK;
c->io_ready &= ~SSH_CHAN_IO_SOCK;
c->sock = -1;
+ c->pfds[3] = -1;
}
ret = close(fd);
@@ -2480,10 +2484,13 @@
u_int pollfd_offset, struct pollfd *pfd)
{
#ifdef DEBUG_CHANNEL_POLL
- debug3_f("channel %d: rfd r%d w%d e%d s%d "
- "pfd[%u].fd=%d want 0x%02x ev 0x%02x ready 0x%02x rev 0x%02x",
- c->self, c->rfd, c->wfd, c->efd, c->sock, pollfd_offset, pfd->fd,
- c->io_want, pfd->events, c->io_ready, pfd->revents);
+ debug3("%s: channel %d: %s r%d w%d e%d s%d c->pfds [ %d %d %d %d ] "
+ "io_want 0x%02x io_ready 0x%02x pfd[%u].fd=%d "
+ "pfd.ev 0x%02x pfd.rev 0x%02x", func, c->self, what,
+ c->rfd, c->wfd, c->efd, c->sock,
+ c->pfds[0], c->pfds[1], c->pfds[2], c->pfds[3],
+ c->io_want, c->io_ready,
+ pollfd_offset, pfd->fd, pfd->events, pfd->revents);
#endif
}
@@ -2492,7 +2499,7 @@
channel_prepare_pollfd(Channel *c, u_int *next_pollfd,
struct pollfd *pfd, u_int npfd)
{
- u_int p = *next_pollfd;
+ u_int ev, p = *next_pollfd;
if (c == NULL)
return;
@@ -2501,7 +2508,7 @@
fatal_f("channel %d: bad pfd offset %u (max %u)",
c->self, p, npfd);
}
- c->pollfd_offset = -1;
+ c->pfds[0] = c->pfds[1] = c->pfds[2] = c->pfds[3] = -1;
/*
* prepare c->rfd
*
@@ -2510,69 +2517,82 @@
* IO too.
*/
if (c->rfd != -1) {
- if (c->pollfd_offset == -1)
- c->pollfd_offset = p;
- pfd[p].fd = c->rfd;
- pfd[p].events = 0;
+ ev = 0;
if ((c->io_want & SSH_CHAN_IO_RFD) != 0)
- pfd[p].events |= POLLIN;
+ ev |= POLLIN;
/* rfd == wfd */
- if (c->wfd == c->rfd &&
- (c->io_want & SSH_CHAN_IO_WFD) != 0)
- pfd[p].events |= POLLOUT;
+ if (c->wfd == c->rfd) {
+ if ((c->io_want & SSH_CHAN_IO_WFD) != 0)
+ ev |= POLLOUT;
+ }
/* rfd == efd */
- if (c->efd == c->rfd &&
- (c->io_want & SSH_CHAN_IO_EFD_R) != 0)
- pfd[p].events |= POLLIN;
- if (c->efd == c->rfd &&
- (c->io_want & SSH_CHAN_IO_EFD_W) != 0)
- pfd[p].events |= POLLOUT;
+ if (c->efd == c->rfd) {
+ if ((c->io_want & SSH_CHAN_IO_EFD_R) != 0)
+ ev |= POLLIN;
+ if ((c->io_want & SSH_CHAN_IO_EFD_W) != 0)
+ ev |= POLLOUT;
+ }
/* rfd == sock */
- if (c->sock == c->rfd &&
- (c->io_want & SSH_CHAN_IO_SOCK_R) != 0)
- pfd[p].events |= POLLIN;
- if (c->sock == c->rfd &&
- (c->io_want & SSH_CHAN_IO_SOCK_W) != 0)
- pfd[p].events |= POLLOUT;
- dump_channel_poll(__func__, "rfd", c, p, &pfd[p]);
- p++;
- }
- /* prepare c->wfd (if not already handled above) */
+ if (c->sock == c->rfd) {
+ if ((c->io_want & SSH_CHAN_IO_SOCK_R) != 0)
+ ev |= POLLIN;
+ if ((c->io_want & SSH_CHAN_IO_SOCK_W) != 0)
+ ev |= POLLOUT;
+ }
+ /* Pack a pfd entry if any event armed for this fd */
+ if (ev != 0) {
+ c->pfds[0] = p;
+ pfd[p].fd = c->rfd;
+ pfd[p].events = ev;
+ dump_channel_poll(__func__, "rfd", c, p, &pfd[p]);
+ p++;
+ }
+ }
+ /* prepare c->wfd if wanting IO and not already handled above */
if (c->wfd != -1 && c->rfd != c->wfd) {
- if (c->pollfd_offset == -1)
- c->pollfd_offset = p;
- pfd[p].fd = c->wfd;
- pfd[p].events = 0;
- if ((c->io_want & SSH_CHAN_IO_WFD) != 0)
- pfd[p].events = POLLOUT;
- dump_channel_poll(__func__, "wfd", c, p, &pfd[p]);
- p++;
- }
- /* prepare c->efd (if not already handled above) */
+ ev = 0;
+ if ((c->io_want & SSH_CHAN_IO_WFD))
+ ev |= POLLOUT;
+ /* Pack a pfd entry if any event armed for this fd */
+ if (ev != 0) {
+ c->pfds[1] = p;
+ pfd[p].fd = c->wfd;
+ pfd[p].events = ev;
+ dump_channel_poll(__func__, "wfd", c, p, &pfd[p]);
+ p++;
+ }
+ }
+ /* prepare c->efd if wanting IO and not already handled above */
if (c->efd != -1 && c->rfd != c->efd) {
- if (c->pollfd_offset == -1)
- c->pollfd_offset = p;
- pfd[p].fd = c->efd;
- pfd[p].events = 0;
+ ev = 0;
if ((c->io_want & SSH_CHAN_IO_EFD_R) != 0)
- pfd[p].events |= POLLIN;
+ ev |= POLLIN;
if ((c->io_want & SSH_CHAN_IO_EFD_W) != 0)
- pfd[p].events |= POLLOUT;
Home |
Main Index |
Thread Index |
Old Index