summaryrefslogtreecommitdiff
path: root/auth-rh-rsa.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-25 11:54:57 +1100
committerDamien Miller <djm@mindrot.org>1999-11-25 11:54:57 +1100
commit5428f646ad32da88ddd04a8c287d595524674fbf (patch)
treecc1f1e5d7852e1f44d41077f776abf7dab7ac06d /auth-rh-rsa.c
parent9072e1889648988da38b7b81bce95291c1dc3a23 (diff)
- More reformatting merged from OpenBSD CVS
- Merged OpenBSD CVS changes: - [channels.c] report from mrwizard@psu.edu via djm@ibs.com.au - [channels.c] set SO_REUSEADDR and SO_LINGER for forwarded ports. chip@valinux.com via damien@ibs.com.au - [nchan.c] it's not an error() if shutdown_write failes in nchan. - [readconf.c] remove dead #ifdef-0-code - [readconf.c servconf.c] strcasecmp instead of tolower - [scp.c] progress meter overflow fix from damien@ibs.com.au - [ssh-add.1 ssh-add.c] SSH_ASKPASS support - [ssh.1 ssh.c] postpone fork_after_authentication until command execution, request/patch from jahakala@cc.jyu.fi via damien@ibs.com.au plus: use daemon() for backgrounding
Diffstat (limited to 'auth-rh-rsa.c')
-rw-r--r--auth-rh-rsa.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 4e9a383a..1392455c 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-RCSID("$Id: auth-rh-rsa.c,v 1.6 1999/11/24 13:26:21 damien Exp $");
+RCSID("$Id: auth-rh-rsa.c,v 1.7 1999/11/25 00:54:57 damien Exp $");
#include "packet.h"
#include "ssh.h"
@@ -23,8 +23,10 @@ RCSID("$Id: auth-rh-rsa.c,v 1.6 1999/11/24 13:26:21 damien Exp $");
#include "uidswap.h"
#include "servconf.h"
-/* Tries to authenticate the user using the .rhosts file and the host using
- its host key. Returns true if authentication succeeds. */
+/*
+ * Tries to authenticate the user using the .rhosts file and the host using
+ * its host key. Returns true if authentication succeeds.
+ */
int
auth_rhosts_rsa(struct passwd *pw, const char *client_user,
@@ -57,8 +59,10 @@ auth_rhosts_rsa(struct passwd *pw, const char *client_user,
if (host_status != HOST_OK && !options.ignore_user_known_hosts) {
struct stat st;
char *user_hostfile = tilde_expand_filename(SSH_USER_HOSTFILE, pw->pw_uid);
- /* Check file permissions of SSH_USER_HOSTFILE, auth_rsa()
- did already check pw->pw_dir, but there is a race XXX */
+ /*
+ * Check file permissions of SSH_USER_HOSTFILE, auth_rsa()
+ * did already check pw->pw_dir, but there is a race XXX
+ */
if (options.strict_modes &&
(stat(user_hostfile, &st) == 0) &&
((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
@@ -91,8 +95,10 @@ auth_rhosts_rsa(struct passwd *pw, const char *client_user,
canonical_hostname);
return 0;
}
- /* We have authenticated the user using .rhosts or /etc/hosts.equiv, and the host using RSA.
- We accept the authentication. */
+ /*
+ * We have authenticated the user using .rhosts or /etc/hosts.equiv,
+ * and the host using RSA. We accept the authentication.
+ */
verbose("Rhosts with RSA host authentication accepted for %.100s, %.100s on %.700s.",
pw->pw_name, client_user, canonical_hostname);