diff options
Diffstat (limited to 'auth-rhosts.c')
-rw-r--r-- | auth-rhosts.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/auth-rhosts.c b/auth-rhosts.c index 57296e1f6..63c1c8acb 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth-rhosts.c,v 1.49 2018/07/09 21:35:50 markus Exp $ */ | 1 | /* $OpenBSD: auth-rhosts.c,v 1.50 2019/06/28 13:35:04 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -222,8 +222,8 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, | |||
222 | * are no system-wide files. | 222 | * are no system-wide files. |
223 | */ | 223 | */ |
224 | if (!rhosts_files[rhosts_file_index] && | 224 | if (!rhosts_files[rhosts_file_index] && |
225 | stat(_PATH_RHOSTS_EQUIV, &st) < 0 && | 225 | stat(_PATH_RHOSTS_EQUIV, &st) == -1 && |
226 | stat(_PATH_SSH_HOSTS_EQUIV, &st) < 0) { | 226 | stat(_PATH_SSH_HOSTS_EQUIV, &st) == -1) { |
227 | debug3("%s: no hosts access files exist", __func__); | 227 | debug3("%s: no hosts access files exist", __func__); |
228 | return 0; | 228 | return 0; |
229 | } | 229 | } |
@@ -253,7 +253,7 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, | |||
253 | * Check that the home directory is owned by root or the user, and is | 253 | * Check that the home directory is owned by root or the user, and is |
254 | * not group or world writable. | 254 | * not group or world writable. |
255 | */ | 255 | */ |
256 | if (stat(pw->pw_dir, &st) < 0) { | 256 | if (stat(pw->pw_dir, &st) == -1) { |
257 | logit("Rhosts authentication refused for %.100s: " | 257 | logit("Rhosts authentication refused for %.100s: " |
258 | "no home directory %.200s", pw->pw_name, pw->pw_dir); | 258 | "no home directory %.200s", pw->pw_name, pw->pw_dir); |
259 | auth_debug_add("Rhosts authentication refused for %.100s: " | 259 | auth_debug_add("Rhosts authentication refused for %.100s: " |
@@ -278,7 +278,7 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, | |||
278 | /* Check users .rhosts or .shosts. */ | 278 | /* Check users .rhosts or .shosts. */ |
279 | snprintf(buf, sizeof buf, "%.500s/%.100s", | 279 | snprintf(buf, sizeof buf, "%.500s/%.100s", |
280 | pw->pw_dir, rhosts_files[rhosts_file_index]); | 280 | pw->pw_dir, rhosts_files[rhosts_file_index]); |
281 | if (stat(buf, &st) < 0) | 281 | if (stat(buf, &st) == -1) |
282 | continue; | 282 | continue; |
283 | 283 | ||
284 | /* | 284 | /* |