diff options
Diffstat (limited to 'auth-rhosts.c')
-rw-r--r-- | auth-rhosts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/auth-rhosts.c b/auth-rhosts.c index 901c8d139..8314e23a1 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$OpenBSD: auth-rhosts.c,v 1.15 2000/09/07 20:27:49 deraadt Exp $"); | 17 | RCSID("$OpenBSD: auth-rhosts.c,v 1.16 2000/10/03 18:03:03 markus Exp $"); |
18 | 18 | ||
19 | #include "packet.h" | 19 | #include "packet.h" |
20 | #include "ssh.h" | 20 | #include "ssh.h" |
@@ -154,6 +154,9 @@ auth_rhosts(struct passwd *pw, const char *client_user) | |||
154 | static const char *rhosts_files[] = {".shosts", ".rhosts", NULL}; | 154 | static const char *rhosts_files[] = {".shosts", ".rhosts", NULL}; |
155 | unsigned int rhosts_file_index; | 155 | unsigned int rhosts_file_index; |
156 | 156 | ||
157 | /* no user given */ | ||
158 | if (pw == NULL) | ||
159 | return 0; | ||
157 | /* Switch to the user's uid. */ | 160 | /* Switch to the user's uid. */ |
158 | temporarily_use_uid(pw->pw_uid); | 161 | temporarily_use_uid(pw->pw_uid); |
159 | /* | 162 | /* |