summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/auth.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2012-04-11 13:17:54 +0000
committerdjm <djm@openbsd.org>2012-04-11 13:17:54 +0000
commit98b1f30586addbc7961c9a85d3c87e7fd2427d34 (patch)
tree0f4fe175cf727c9c230f5d417eebb72a407a2fee /usr.bin/ssh/auth.c
parentdon't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a (diff)
downloadwireguard-openbsd-98b1f30586addbc7961c9a85d3c87e7fd2427d34.tar.xz
wireguard-openbsd-98b1f30586addbc7961c9a85d3c87e7fd2427d34.zip
Support "none" as an argument for AuthorizedPrincipalsFile to indicate
no file should be read.
Diffstat (limited to 'usr.bin/ssh/auth.c')
-rw-r--r--usr.bin/ssh/auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c
index d3663a487ce..a3920fab111 100644
--- a/usr.bin/ssh/auth.c
+++ b/usr.bin/ssh/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.95 2012/04/11 13:17:54 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -267,7 +267,8 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
char *
authorized_principals_file(struct passwd *pw)
{
- if (options.authorized_principals_file == NULL)
+ if (options.authorized_principals_file == NULL ||
+ strcasecmp(options.authorized_principals_file, "none") == 0)
return NULL;
return expand_authorized_keys(options.authorized_principals_file, pw);
}