diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:02:15 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:02:15 +1100 |
commit | 2f8b3d9855be2cd6a43d32d7b1799ca415f19f1c (patch) | |
tree | 0e0153f8bc9d4990c5fb8e8ab457b166a5aba8b1 /monitor_wrap.c | |
parent | 32e42c74a54ba10bf6859f83b52e5b5e7d3c796a (diff) | |
download | openssh-git-2f8b3d9855be2cd6a43d32d7b1799ca415f19f1c.tar.gz |
- dtucker@cvs.openbsd.org 2007/10/29 04:08:08
[monitor_wrap.c monitor.c]
Send config block back to slave for invalid users too so options
set by a Match block (eg Banner) behave the same for non-existent
users. Found by and ok djm@
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index 7ac84529..e895f192 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.59 2007/09/21 08:15:29 djm Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.60 2007/10/29 04:08:08 dtucker Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * Copyright 2002 Markus Friedl <markus@openbsd.org> @@ -222,8 +222,8 @@ mm_getpwnamallow(const char *username) mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PWNAM, &m); if (buffer_get_char(&m) == 0) { - buffer_free(&m); - return (NULL); + pw = NULL; + goto out; } pw = buffer_get_string(&m, &len); if (len != sizeof(struct passwd)) @@ -237,6 +237,7 @@ mm_getpwnamallow(const char *username) pw->pw_dir = buffer_get_string(&m, NULL); pw->pw_shell = buffer_get_string(&m, NULL); +out: /* copy options block as a Match directive may have changed some */ newopts = buffer_get_string(&m, &len); if (len != sizeof(*newopts)) |