diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | monitor.c | 6 | ||||
-rw-r--r-- | monitor_wrap.c | 7 |
3 files changed, 13 insertions, 7 deletions
@@ -12,6 +12,11 @@ | |||
12 | [ssh.c] | 12 | [ssh.c] |
13 | Plug tiny mem leaks in ControlPath and ProxyCommand option processing; | 13 | Plug tiny mem leaks in ControlPath and ProxyCommand option processing; |
14 | ok djm@ | 14 | ok djm@ |
15 | - dtucker@cvs.openbsd.org 2007/10/29 04:08:08 | ||
16 | [monitor_wrap.c monitor.c] | ||
17 | Send config block back to slave for invalid users too so options | ||
18 | set by a Match block (eg Banner) behave the same for non-existent | ||
19 | users. Found by and ok djm@ | ||
15 | 20 | ||
16 | 20071030 | 21 | 20071030 |
17 | - (djm) OpenBSD CVS Sync | 22 | - (djm) OpenBSD CVS Sync |
@@ -3429,4 +3434,4 @@ | |||
3429 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3434 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3430 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3435 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3431 | 3436 | ||
3432 | $Id: ChangeLog,v 1.4798 2007/12/02 12:01:03 dtucker Exp $ | 3437 | $Id: ChangeLog,v 1.4799 2007/12/02 12:02:15 dtucker Exp $ |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.93 2007/09/21 08:15:29 djm Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.94 2007/10/29 04:08:08 dtucker 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> |
@@ -643,11 +643,11 @@ mm_answer_pwnamallow(int sock, Buffer *m) | |||
643 | #endif | 643 | #endif |
644 | buffer_put_cstring(m, pwent->pw_dir); | 644 | buffer_put_cstring(m, pwent->pw_dir); |
645 | buffer_put_cstring(m, pwent->pw_shell); | 645 | buffer_put_cstring(m, pwent->pw_shell); |
646 | |||
647 | out: | ||
646 | buffer_put_string(m, &options, sizeof(options)); | 648 | buffer_put_string(m, &options, sizeof(options)); |
647 | if (options.banner != NULL) | 649 | if (options.banner != NULL) |
648 | buffer_put_cstring(m, options.banner); | 650 | buffer_put_cstring(m, options.banner); |
649 | |||
650 | out: | ||
651 | debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed); | 651 | debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed); |
652 | mm_request_send(sock, MONITOR_ANS_PWNAM, m); | 652 | mm_request_send(sock, MONITOR_ANS_PWNAM, m); |
653 | 653 | ||
diff --git a/monitor_wrap.c b/monitor_wrap.c index 7ac845296..e895f1924 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor_wrap.c,v 1.59 2007/09/21 08:15:29 djm Exp $ */ | 1 | /* $OpenBSD: monitor_wrap.c,v 1.60 2007/10/29 04:08:08 dtucker 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> |
@@ -222,8 +222,8 @@ mm_getpwnamallow(const char *username) | |||
222 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PWNAM, &m); | 222 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PWNAM, &m); |
223 | 223 | ||
224 | if (buffer_get_char(&m) == 0) { | 224 | if (buffer_get_char(&m) == 0) { |
225 | buffer_free(&m); | 225 | pw = NULL; |
226 | return (NULL); | 226 | goto out; |
227 | } | 227 | } |
228 | pw = buffer_get_string(&m, &len); | 228 | pw = buffer_get_string(&m, &len); |
229 | if (len != sizeof(struct passwd)) | 229 | if (len != sizeof(struct passwd)) |
@@ -237,6 +237,7 @@ mm_getpwnamallow(const char *username) | |||
237 | pw->pw_dir = buffer_get_string(&m, NULL); | 237 | pw->pw_dir = buffer_get_string(&m, NULL); |
238 | pw->pw_shell = buffer_get_string(&m, NULL); | 238 | pw->pw_shell = buffer_get_string(&m, NULL); |
239 | 239 | ||
240 | out: | ||
240 | /* copy options block as a Match directive may have changed some */ | 241 | /* copy options block as a Match directive may have changed some */ |
241 | newopts = buffer_get_string(&m, &len); | 242 | newopts = buffer_get_string(&m, &len); |
242 | if (len != sizeof(*newopts)) | 243 | if (len != sizeof(*newopts)) |