=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/auth-rhosts.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/ssh/auth-rhosts.c 1999/10/03 20:09:18 1.5 +++ src/usr.bin/ssh/auth-rhosts.c 1999/11/11 23:36:52 1.6 @@ -16,12 +16,13 @@ */ #include "includes.h" -RCSID("$Id: auth-rhosts.c,v 1.5 1999/10/03 20:09:18 deraadt Exp $"); +RCSID("$Id: auth-rhosts.c,v 1.6 1999/11/11 23:36:52 markus Exp $"); #include "packet.h" #include "ssh.h" #include "xmalloc.h" #include "uidswap.h" +#include "servconf.h" /* This function processes an rhosts-style file (.rhosts, .shosts, or /etc/hosts.equiv). This returns true if authentication can be granted @@ -155,9 +156,9 @@ true, only /etc/hosts.equiv will be considered (.rhosts and .shosts are ignored). */ -int auth_rhosts(struct passwd *pw, const char *client_user, - int ignore_rhosts, int strict_modes) +int auth_rhosts(struct passwd *pw, const char *client_user) { + extern ServerOptions options; char buf[1024]; const char *hostname, *ipaddr; int port; @@ -234,7 +235,7 @@ pw->pw_name, pw->pw_dir); return 0; } - if (strict_modes && + if (options.strict_modes && ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || (st.st_mode & 022) != 0)) { @@ -261,7 +262,7 @@ and make sure it is not writable by anyone but the owner. This is to help avoid novices accidentally allowing access to their account by anyone. */ - if (strict_modes && + if (options.strict_modes && ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || (st.st_mode & 022) != 0)) { @@ -273,7 +274,7 @@ /* Check if we have been configured to ignore .rhosts and .shosts files. */ - if (ignore_rhosts) + if (options.ignore_rhosts) { packet_send_debug("Server has been configured to ignore %.100s.", rhosts_files[rhosts_file_index]);