summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 43f484709..96d22b7e4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.166 2016/09/28 16:33:06 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.167 2017/02/03 23:05:57 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -283,6 +283,7 @@ monitor_permit_authentications(int permit)
283void 283void
284monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor) 284monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
285{ 285{
286 struct ssh *ssh = active_state; /* XXX */
286 struct mon_table *ent; 287 struct mon_table *ent;
287 int authenticated = 0, partial = 0; 288 int authenticated = 0, partial = 0;
288 289
@@ -356,6 +357,7 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
356 357
357 debug("%s: %s has been authenticated by privileged process", 358 debug("%s: %s has been authenticated by privileged process",
358 __func__, authctxt->user); 359 __func__, authctxt->user);
360 ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user);
359 361
360 mm_get_keystate(pmonitor); 362 mm_get_keystate(pmonitor);
361 363
@@ -695,6 +697,7 @@ mm_answer_sign(int sock, Buffer *m)
695int 697int
696mm_answer_pwnamallow(int sock, Buffer *m) 698mm_answer_pwnamallow(int sock, Buffer *m)
697{ 699{
700 struct ssh *ssh = active_state; /* XXX */
698 char *username; 701 char *username;
699 struct passwd *pwent; 702 struct passwd *pwent;
700 int allowed = 0; 703 int allowed = 0;
@@ -739,6 +742,8 @@ mm_answer_pwnamallow(int sock, Buffer *m)
739 buffer_put_cstring(m, pwent->pw_shell); 742 buffer_put_cstring(m, pwent->pw_shell);
740 743
741 out: 744 out:
745 ssh_packet_set_log_preamble(ssh, "%suser %s",
746 authctxt->valid ? "authenticating" : "invalid ", authctxt->user);
742 buffer_put_string(m, &options, sizeof(options)); 747 buffer_put_string(m, &options, sizeof(options));
743 748
744#define M_CP_STROPT(x) do { \ 749#define M_CP_STROPT(x) do { \