Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 'sshd' in -current prints "Banner" file twice?



On Mon, 17 Oct 2022, John D. Baker wrote:

When I log in it prints the banner file TWICE.


Looks like a minor merge error. Please try the patch below:

---START---
diff -urN src.orig/crypto/external/bsd/openssh/dist/auth2.c src/crypto/external/bsd/openssh/dist/auth2.c
--- src.orig/crypto/external/bsd/openssh/dist/auth2.c	2022-02-23 19:07:20.000000000 +0000
+++ src/crypto/external/bsd/openssh/dist/auth2.c	2022-10-17 23:46:31.896529000 +0000
@@ -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);
 }
---END---

-RVP


Home | Main Index | Thread Index | Old Index