[PATCH 1/1] update error messages about moduli and primes files

Christian Hesse list at eworm.de
Wed Jul 1 18:30:05 AEST 2015


From: Christian Hesse <mail at eworm.de>

Both files can be used, so mention both in error messages.

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 dh.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dh.c b/dh.c
index 4c639ac..450f5c4 100644
--- a/dh.c
+++ b/dh.c
@@ -153,8 +153,8 @@ choose_dh(int min, int wantbits, int max)
 
 	if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL &&
 	    (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) {
-		logit("WARNING: %s does not exist, using fixed modulus",
-		    _PATH_DH_MODULI);
+		logit("WARNING: neither %s nor %s exists, using fixed modulus",
+		    _PATH_DH_MODULI, _PATH_DH_PRIMES);
 		return (dh_new_group_fallback(max));
 	}
 
@@ -182,7 +182,8 @@ choose_dh(int min, int wantbits, int max)
 
 	if (bestcount == 0) {
 		fclose(f);
-		logit("WARNING: no suitable primes in %s", _PATH_DH_PRIMES);
+		logit("WARNING: no suitable primes in %s or %s",
+		    _PATH_DH_MODULI, _PATH_DH_PRIMES);
 		return (dh_new_group_fallback(max));
 	}
 
-- 
2.4.5



More information about the openssh-unix-dev mailing list