]> andersk Git - openssh.git/blobdiff - auth2-none.c
- (dtucker) [session.c openbsd-compat/bsd-cygwin_util.h] Move Cygwin
[openssh.git] / auth2-none.c
index 30337fd6dd9c432ad52dc2fae81d56f4e9411194..3332f4f83207da13488d6ae9fc09592f72a29fd8 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2-none.c,v 1.2 2002/05/31 11:35:15 markus Exp $");
+RCSID("$OpenBSD: auth2-none.c,v 1.5 2003/07/31 09:21:02 markus Exp $");
 
 #include "auth.h"
 #include "xmalloc.h"
@@ -61,11 +61,11 @@ auth2_read_banner(void)
        close(fd);
 
        if (n != len) {
-               free(banner);
+               xfree(banner);
                return (NULL);
        }
        banner[n] = '\0';
-       
+
        return (banner);
 }
 
@@ -88,7 +88,6 @@ userauth_banner(void)
 done:
        if (banner)
                xfree(banner);
-       return;
 }
 
 static int
@@ -101,7 +100,9 @@ userauth_none(Authctxt *authctxt)
        if (check_nt_auth(1, authctxt->pw) == 0)
                return(0);
 #endif
-       return (authctxt->valid ? PRIVSEP(auth_password(authctxt, "")) : 0);
+       if (options.password_authentication && authctxt->valid)
+               return (PRIVSEP(auth_password(authctxt, "")));
+       return (0);
 }
 
 Authmethod method_none = {
This page took 0.051319 seconds and 4 git commands to generate.