forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upstream: begin landing remaining refactoring of packet parsing
API, started almost exactly six years ago. This change stops including the old packet_* API by default and makes each file that requires the old API include it explicitly. We will commit file-by-file refactoring to remove the old API in consistent steps. with & ok markus@ OpenBSD-Commit-ID: 93c98a6b38f6911fd1ae025a1ec57807fb4d4ef4
- Loading branch information
Showing
17 changed files
with
62 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: channels.c,v 1.387 2018/12/07 02:31:20 djm Exp $ */ | ||
/* $OpenBSD: channels.c,v 1.388 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -84,6 +84,9 @@ | |
#include "pathnames.h" | ||
#include "match.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
/* -- agent forwarding */ | ||
#define NUM_SOCKS 10 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: clientloop.c,v 1.318 2018/09/21 12:46:22 djm Exp $ */ | ||
/* $OpenBSD: clientloop.c,v 1.319 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -112,6 +112,9 @@ | |
#include "ssherr.h" | ||
#include "hostfile.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
/* import options */ | ||
extern Options options; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: monitor.c,v 1.188 2018/11/16 02:43:56 djm Exp $ */ | ||
/* $OpenBSD: monitor.c,v 1.189 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Copyright 2002 Niels Provos <[email protected]> | ||
* Copyright 2002 Markus Friedl <[email protected]> | ||
|
@@ -96,6 +96,9 @@ | |
#include "match.h" | ||
#include "ssherr.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
#ifdef GSSAPI | ||
static Gssctxt *gsscontext = NULL; | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: monitor_wrap.c,v 1.107 2018/07/20 03:46:34 djm Exp $ */ | ||
/* $OpenBSD: monitor_wrap.c,v 1.108 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Copyright 2002 Niels Provos <[email protected]> | ||
* Copyright 2002 Markus Friedl <[email protected]> | ||
|
@@ -76,6 +76,9 @@ | |
|
||
#include "ssherr.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
/* Imports */ | ||
extern struct monitor *pmonitor; | ||
extern struct sshbuf *loginmsg; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: mux.c,v 1.77 2018/09/26 07:32:44 djm Exp $ */ | ||
/* $OpenBSD: mux.c,v 1.78 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Copyright (c) 2002-2008 Damien Miller <[email protected]> | ||
* | ||
|
@@ -68,6 +68,9 @@ | |
#include "clientloop.h" | ||
#include "ssherr.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
/* from ssh.c */ | ||
extern int tty_flag; | ||
extern Options options; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: packet.h,v 1.86 2018/07/09 21:20:26 markus Exp $ */ | ||
/* $OpenBSD: packet.h,v 1.87 2019/01/19 21:31:32 djm Exp $ */ | ||
|
||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
|
@@ -204,10 +204,6 @@ int sshpkt_get_end(struct ssh *ssh); | |
void sshpkt_fmt_connection_id(struct ssh *ssh, char *s, size_t l); | ||
const u_char *sshpkt_ptr(struct ssh *, size_t *lenp); | ||
|
||
/* OLD API */ | ||
extern struct ssh *active_state; | ||
#include "opacket.h" | ||
|
||
#if !defined(WITH_OPENSSL) | ||
# undef BIGNUM | ||
# undef EC_KEY | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* $OpenBSD: servconf.c,v 1.344 2018/11/19 04:12:32 djm Exp $ */ | ||
/* $OpenBSD: servconf.c,v 1.345 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
* All rights reserved | ||
|
@@ -65,6 +65,9 @@ | |
#include "myproposal.h" | ||
#include "digest.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
static void add_listen_addr(ServerOptions *, const char *, | ||
const char *, int); | ||
static void add_one_listen_addr(ServerOptions *, const char *, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: serverloop.c,v 1.209 2018/07/27 05:13:02 dtucker Exp $ */ | ||
/* $OpenBSD: serverloop.c,v 1.210 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -78,6 +78,9 @@ | |
#include "serverloop.h" | ||
#include "ssherr.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
extern ServerOptions options; | ||
|
||
/* XXX */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: session.c,v 1.309 2019/01/17 04:45:09 djm Exp $ */ | ||
/* $OpenBSD: session.c,v 1.310 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
* All rights reserved | ||
|
@@ -105,6 +105,9 @@ | |
#include <selinux/selinux.h> | ||
#endif | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
#define IS_INTERNAL_SFTP(c) \ | ||
(!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \ | ||
(c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: ssh.c,v 1.497 2018/12/27 03:25:25 djm Exp $ */ | ||
/* $OpenBSD: ssh.c,v 1.498 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -113,6 +113,9 @@ | |
#include "ssh-pkcs11.h" | ||
#endif | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX move here */ | ||
|
||
extern char *__progname; | ||
|
||
/* Saves a copy of argv for setproctitle emulation */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: sshconnect.c,v 1.309 2018/12/27 03:25:25 djm Exp $ */ | ||
/* $OpenBSD: sshconnect.c,v 1.310 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -70,6 +70,9 @@ | |
#include "authfd.h" | ||
#include "kex.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX */ | ||
|
||
struct sshkey *previous_host_key = NULL; | ||
|
||
static int matching_host_key_dns = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: sshd.c,v 1.521 2019/01/17 01:50:24 djm Exp $ */ | ||
/* $OpenBSD: sshd.c,v 1.522 2019/01/19 21:31:32 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -123,6 +123,9 @@ | |
#include "version.h" | ||
#include "ssherr.h" | ||
|
||
#include "opacket.h" /* XXX */ | ||
extern struct ssh *active_state; /* XXX move decl to this file */ | ||
|
||
/* Re-exec fds */ | ||
#define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1) | ||
#define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2) | ||
|