]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth-rhosts.c
Import of OpenSSH 4.7p1
[gssapi-openssh.git] / openssh / auth-rhosts.c
index b42a64c90acbb9aef44f025cd4aba6101c519a14..cd0a7967a2442f0e9f4da9f658cd041a21513e72 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenBSD: auth-rhosts.c,v 1.41 2006/08/03 03:34:41 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rhosts.c,v 1.31 2003/06/02 09:17:34 markus Exp $");
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_NETGROUP_H
+# include <netgroup.h>
+#endif
+#include <pwd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
 
 #include "packet.h"
+#include "buffer.h"
 #include "uidswap.h"
 #include "pathnames.h"
 #include "log.h"
 #include "servconf.h"
 #include "canohost.h"
+#include "key.h"
+#include "hostfile.h"
 #include "auth.h"
 
 /* import */
@@ -133,7 +147,7 @@ check_rhosts_file(const char *filename, const char *hostname,
                /* If the entry was negated, deny access. */
                if (negated) {
                        auth_debug_add("Matched negative entry in %.100s.",
-                            filename);
+                           filename);
                        return 0;
                }
                /* Accept authentication. */
@@ -173,10 +187,6 @@ auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostnam
        debug2("auth_rhosts2: clientuser %s hostname %s ipaddr %s",
            client_user, hostname, ipaddr);
 
-       /* no user given */
-       if (pw == NULL)
-               return 0;
-
        /* Switch to the user's uid. */
        temporarily_use_uid(pw);
        /*
This page took 0.052381 seconds and 4 git commands to generate.