=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/auth-rhosts.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- src/usr.bin/ssh/auth-rhosts.c 2018/07/09 21:35:50 1.49 +++ src/usr.bin/ssh/auth-rhosts.c 2019/06/28 13:35:04 1.50 @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.49 2018/07/09 21:35:50 markus Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.50 2019/06/28 13:35:04 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -218,8 +218,8 @@ * are no system-wide files. */ if (!rhosts_files[rhosts_file_index] && - stat(_PATH_RHOSTS_EQUIV, &st) < 0 && - stat(_PATH_SSH_HOSTS_EQUIV, &st) < 0) { + stat(_PATH_RHOSTS_EQUIV, &st) == -1 && + stat(_PATH_SSH_HOSTS_EQUIV, &st) == -1) { debug3("%s: no hosts access files exist", __func__); return 0; } @@ -249,7 +249,7 @@ * Check that the home directory is owned by root or the user, and is * not group or world writable. */ - if (stat(pw->pw_dir, &st) < 0) { + if (stat(pw->pw_dir, &st) == -1) { logit("Rhosts authentication refused for %.100s: " "no home directory %.200s", pw->pw_name, pw->pw_dir); auth_debug_add("Rhosts authentication refused for %.100s: " @@ -274,7 +274,7 @@ /* Check users .rhosts or .shosts. */ snprintf(buf, sizeof buf, "%.500s/%.100s", pw->pw_dir, rhosts_files[rhosts_file_index]); - if (stat(buf, &st) < 0) + if (stat(buf, &st) == -1) continue; /*