Deleted Added
full compact
auth-rhosts.c (124208) auth-rhosts.c (126274)
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Rhosts authentication. This file contains code to check whether to admit
6 * the login based on rhosts authentication. This file also processes
7 * /etc/hosts.equiv.
8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 */
15
16#include "includes.h"
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Rhosts authentication. This file contains code to check whether to admit
6 * the login based on rhosts authentication. This file also processes
7 * /etc/hosts.equiv.
8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 */
15
16#include "includes.h"
17RCSID("$OpenBSD: auth-rhosts.c,v 1.31 2003/06/02 09:17:34 markus Exp $");
17RCSID("$OpenBSD: auth-rhosts.c,v 1.32 2003/11/04 08:54:09 djm Exp $");
18
19#include "packet.h"
20#include "uidswap.h"
21#include "pathnames.h"
22#include "log.h"
23#include "servconf.h"
24#include "canohost.h"
25#include "auth.h"

--- 142 unchanged lines hidden (view full) ---

168 char buf[1024];
169 struct stat st;
170 static const char *rhosts_files[] = {".shosts", ".rhosts", NULL};
171 u_int rhosts_file_index;
172
173 debug2("auth_rhosts2: clientuser %s hostname %s ipaddr %s",
174 client_user, hostname, ipaddr);
175
18
19#include "packet.h"
20#include "uidswap.h"
21#include "pathnames.h"
22#include "log.h"
23#include "servconf.h"
24#include "canohost.h"
25#include "auth.h"

--- 142 unchanged lines hidden (view full) ---

168 char buf[1024];
169 struct stat st;
170 static const char *rhosts_files[] = {".shosts", ".rhosts", NULL};
171 u_int rhosts_file_index;
172
173 debug2("auth_rhosts2: clientuser %s hostname %s ipaddr %s",
174 client_user, hostname, ipaddr);
175
176 /* no user given */
177 if (pw == NULL)
178 return 0;
179
180 /* Switch to the user's uid. */
181 temporarily_use_uid(pw);
182 /*
183 * Quick check: if the user has no .shosts or .rhosts files, return
184 * failure immediately without doing costly lookups from name
185 * servers.
186 */
187 for (rhosts_file_index = 0; rhosts_files[rhosts_file_index];

--- 112 unchanged lines hidden ---
176 /* Switch to the user's uid. */
177 temporarily_use_uid(pw);
178 /*
179 * Quick check: if the user has no .shosts or .rhosts files, return
180 * failure immediately without doing costly lookups from name
181 * servers.
182 */
183 for (rhosts_file_index = 0; rhosts_files[rhosts_file_index];

--- 112 unchanged lines hidden ---