Module Name:    src
Committed By:   christos
Date:           Sat Dec  7 16:32:22 UTC 2019

Modified Files:
        src/crypto/external/bsd/openssh/dist: auth2.c monitor.c

Log Message:
Add some more pfilter_notify() calls where authentication attempts fail.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/auth2.c
cvs rdiff -u -r1.30 -r1.31 src/crypto/external/bsd/openssh/dist/monitor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/dist/auth2.c
diff -u src/crypto/external/bsd/openssh/dist/auth2.c:1.20 src/crypto/external/bsd/openssh/dist/auth2.c:1.21
--- src/crypto/external/bsd/openssh/dist/auth2.c:1.20	Sat Oct 12 14:32:22 2019
+++ src/crypto/external/bsd/openssh/dist/auth2.c	Sat Dec  7 11:32:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: auth2.c,v 1.20 2019/10/12 18:32:22 christos Exp $	*/
+/*	$NetBSD: auth2.c,v 1.21 2019/12/07 16:32:22 christos Exp $	*/
 /* $OpenBSD: auth2.c,v 1.157 2019/09/06 04:53:27 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: auth2.c,v 1.20 2019/10/12 18:32:22 christos Exp $");
+__RCSID("$NetBSD: auth2.c,v 1.21 2019/12/07 16:32:22 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -440,8 +440,10 @@ userauth_finish(struct ssh *ssh, int aut
 	} else {
 		/* Allow initial try of "none" auth without failure penalty */
 		if (!partial && !authctxt->server_caused_failure &&
-		    (authctxt->attempt > 1 || strcmp(method, "none") != 0))
+		    (authctxt->attempt > 1 || strcmp(method, "none") != 0)) {
 			authctxt->failures++;
+			pfilter_notify(1);
+		}
 		if (authctxt->failures >= options.max_authtries)
 			auth_maxtries_exceeded(ssh);
 		methods = authmethods_get(authctxt);

Index: src/crypto/external/bsd/openssh/dist/monitor.c
diff -u src/crypto/external/bsd/openssh/dist/monitor.c:1.30 src/crypto/external/bsd/openssh/dist/monitor.c:1.31
--- src/crypto/external/bsd/openssh/dist/monitor.c:1.30	Sat Oct 12 14:32:22 2019
+++ src/crypto/external/bsd/openssh/dist/monitor.c	Sat Dec  7 11:32:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: monitor.c,v 1.30 2019/10/12 18:32:22 christos Exp $	*/
+/*	$NetBSD: monitor.c,v 1.31 2019/12/07 16:32:22 christos Exp $	*/
 /* $OpenBSD: monitor.c,v 1.199 2019/10/07 23:10:38 djm Exp $ */
 /*
  * Copyright 2002 Niels Provos <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: monitor.c,v 1.30 2019/10/12 18:32:22 christos Exp $");
+__RCSID("$NetBSD: monitor.c,v 1.31 2019/12/07 16:32:22 christos Exp $");
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
@@ -320,8 +320,10 @@ monitor_child_preauth(struct ssh *ssh, s
 		if (ent->flags & (MON_AUTHDECIDE|MON_ALOG)) {
 			auth_log(ssh, authenticated, partial,
 			    auth_method, auth_submethod);
-			if (!partial && !authenticated)
+			if (!partial && !authenticated) {
+				pfilter_notify(1);
 				authctxt->failures++;
+			}
 			if (authenticated || partial) {
 				auth2_update_session_info(authctxt,
 				    auth_method, auth_submethod);
@@ -1223,6 +1225,7 @@ mm_answer_keyallowed(struct ssh *ssh, in
 	} else {
 		/* Log failed attempt */
 		auth_log(ssh, 0, 0, auth_method, NULL);
+		pfilter_notify(1);
 		free(cuser);
 		free(chost);
 	}

Reply via email to