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 Avoid sending banner (if co...



details:   https://anonhg.NetBSD.org/src/rev/b7acf3b0785d
branches:  trunk
changeset: 371930:b7acf3b0785d
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Oct 18 06:46:51 2022 +0000

description:
Avoid sending banner (if configured) twice.   Apparent merge error.
Patch from RVP (issue noticed by John D. Baker).

diffstat:

 crypto/external/bsd/openssh/dist/auth2.c |  13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diffs (48 lines):

diff -r dae86aa293a7 -r b7acf3b0785d crypto/external/bsd/openssh/dist/auth2.c
--- a/crypto/external/bsd/openssh/dist/auth2.c  Tue Oct 18 06:44:43 2022 +0000
+++ b/crypto/external/bsd/openssh/dist/auth2.c  Tue Oct 18 06:46:51 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth2.c,v 1.25 2022/02/23 19:07:20 christos Exp $      */
+/*     $NetBSD: auth2.c,v 1.26 2022/10/18 06:46:51 kre Exp $   */
 /* $OpenBSD: auth2.c,v 1.164 2022/02/23 11:18:13 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: auth2.c,v 1.25 2022/02/23 19:07:20 christos Exp $");
+__RCSID("$NetBSD: auth2.c,v 1.26 2022/10/18 06:46:51 kre Exp $");
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -158,7 +158,7 @@
            (r = sshpkt_put_cstring(ssh, msg)) != 0 ||
            (r = sshpkt_put_cstring(ssh, "")) != 0 ||   /* language, unused */
            (r = sshpkt_send(ssh)) != 0)
-               fatal("%s: %s", __func__, ssh_err(r));
+               fatal_fr(r, "send packet");
        debug("%s: sent", __func__);
 }
 
@@ -166,7 +166,6 @@
 userauth_banner(struct ssh *ssh)
 {
        char *banner = NULL;
-       int r;
 
        if (options.banner == NULL)
                return;
@@ -175,12 +174,6 @@
                goto done;
        userauth_send_banner(ssh, banner);
 
-       if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_BANNER)) != 0 ||
-           (r = sshpkt_put_cstring(ssh, banner)) != 0 ||
-           (r = sshpkt_put_cstring(ssh, "")) != 0 ||   /* language, unused */
-           (r = sshpkt_send(ssh)) != 0)
-               fatal_fr(r, "send packet");
-       debug("userauth_banner: sent");
 done:
        free(banner);
 }



Home | Main Index | Thread Index | Old Index