aboutsummaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2011-09-28 08:14:41 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2011-09-28 08:14:41 +0000
commit1e26c29b778d4cac65ea2a83f6089e22fe8f8421 (patch)
tree779b14ae51eee4ed5bde82d3600b03a260319632 /auth.c
parentc00cf9e642bae52ddf629123ecd72ca32d6157d8 (diff)
downloadsrc-1e26c29b778d4cac65ea2a83f6089e22fe8f8421.tar.gz
src-1e26c29b778d4cac65ea2a83f6089e22fe8f8421.zip
Vendor import of OpenSSH 5.9p1vendor/openssh/5.9p1
Notes
Notes: svn path=/vendor-crypto/openssh/dist/; revision=225825 svn path=/vendor-crypto/openssh/5.9p1/; revision=225826; tag=vendor/openssh/5.9p1
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/auth.c b/auth.c
index 33680b91bfec..cd95da9319d8 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.91 2010/11/29 23:45:51 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -331,7 +331,7 @@ auth_root_allowed(char *method)
*
* This returns a buffer allocated by xmalloc.
*/
-static char *
+char *
expand_authorized_keys(const char *filename, struct passwd *pw)
{
char *file, ret[MAXPATHLEN];
@@ -355,18 +355,6 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
}
char *
-authorized_keys_file(struct passwd *pw)
-{
- return expand_authorized_keys(options.authorized_keys_file, pw);
-}
-
-char *
-authorized_keys_file2(struct passwd *pw)
-{
- return expand_authorized_keys(options.authorized_keys_file2, pw);
-}
-
-char *
authorized_principals_file(struct passwd *pw)
{
if (options.authorized_principals_file == NULL)
@@ -468,7 +456,6 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
}
strlcpy(buf, cp, sizeof(buf));
- debug3("secure_filename: checking '%s'", buf);
if (stat(buf, &st) < 0 ||
(st.st_uid != 0 && st.st_uid != uid) ||
(st.st_mode & 022) != 0) {
@@ -478,11 +465,9 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
}
/* If are past the homedir then we can stop */
- if (comparehome && strcmp(homedir, buf) == 0) {
- debug3("secure_filename: terminating check at '%s'",
- buf);
+ if (comparehome && strcmp(homedir, buf) == 0)
break;
- }
+
/*
* dirname should always complete with a "/" path,
* but we can be paranoid and check for "." too