]> andersk Git - openssh.git/commitdiff
- dtucker@cvs.openbsd.org 2007/10/29 04:08:08
authordtucker <dtucker>
Sun, 2 Dec 2007 12:02:15 +0000 (12:02 +0000)
committerdtucker <dtucker>
Sun, 2 Dec 2007 12:02:15 +0000 (12:02 +0000)
     [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@

ChangeLog
monitor.c
monitor_wrap.c

index 6842f1216ed98faccf2e755f630db08277c2df92..09f076eba561a386e7cfc265d09c273c68a422ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [ssh.c]
      Plug tiny mem leaks in ControlPath and ProxyCommand option processing;
      ok djm@
+   - 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@
 
 20071030
  - (djm) OpenBSD CVS Sync
index 7996d5a147c4f50e01c90c5ff69d1a24e1e18fb2..2f23669cdca7737591df6ba54e51d28d41ed68e4 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.93 2007/09/21 08:15:29 djm Exp $ */
+/* $OpenBSD: monitor.c,v 1.94 2007/10/29 04:08:08 dtucker Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -643,11 +643,11 @@ mm_answer_pwnamallow(int sock, Buffer *m)
 #endif
        buffer_put_cstring(m, pwent->pw_dir);
        buffer_put_cstring(m, pwent->pw_shell);
+
+ out:
        buffer_put_string(m, &options, sizeof(options));
        if (options.banner != NULL)
                buffer_put_cstring(m, options.banner);
-
- out:
        debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed);
        mm_request_send(sock, MONITOR_ANS_PWNAM, m);
 
index 7ac8452966cbe96cace5313958c71a12aaeb99e2..e895f19240ae6971bcee8346d5d35d1f5ef2a986 100644 (file)
@@ -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))
This page took 0.121723 seconds and 5 git commands to generate.