summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordtucker <dtucker@openbsd.org>2017-06-14 00:31:38 +0000
committerdtucker <dtucker@openbsd.org>2017-06-14 00:31:38 +0000
commit99d4268c9e871bd71513fd3df9e4d1a78bb36792 (patch)
tree81f4bc54bce2e668c63017e41badb6527b562c9e
parentsort (diff)
downloadwireguard-openbsd-99d4268c9e871bd71513fd3df9e4d1a78bb36792.tar.xz
wireguard-openbsd-99d4268c9e871bd71513fd3df9e4d1a78bb36792.zip
Add user@host prefix to client's "Permisison denied" messages, useful in
particular when using "stacked" connections where it's not clear which host is denying. bz#2720, ok djm@ markus@
-rw-r--r--usr.bin/ssh/sshconnect2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 3a5833eb5fc..3a70ebbeec4 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.263 2017/05/31 07:00:13 markus Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.264 2017/06/14 00:31:38 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -461,7 +461,8 @@ userauth(Authctxt *authctxt, char *authlist)
for (;;) {
Authmethod *method = authmethod_get(authlist);
if (method == NULL)
- fatal("Permission denied (%s).", authlist);
+ fatal("%s@%s: Permission denied (%s).",
+ authctxt->server_user, authctxt->host, authlist);
authctxt->method = method;
/* reset the per method handler */