summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2012-04-22 11:21:43 +1000
committerDamien Miller <djm@mindrot.org>2012-04-22 11:21:43 +1000
commit9fed161e67b23977a1070419b356084295422f0c (patch)
tree0fd54cc7e3aa515a18c69886c12c054915b084cc
parenta6508753db3c49910068d8fc324bd284d72ff153 (diff)
- djm@cvs.openbsd.org 2012/04/11 13:17:54
[auth.c] Support "none" as an argument for AuthorizedPrincipalsFile to indicate no file should be read.
-rw-r--r--ChangeLog4
-rw-r--r--auth.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d19da34ae..7cc597586 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,10 @@
21 [channels.c channels.h clientloop.c serverloop.c] 21 [channels.c channels.h clientloop.c serverloop.c]
22 don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a 22 don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a
23 while; ok deraadt@ markus@ 23 while; ok deraadt@ markus@
24 - djm@cvs.openbsd.org 2012/04/11 13:17:54
25 [auth.c]
26 Support "none" as an argument for AuthorizedPrincipalsFile to indicate
27 no file should be read.
24 28
2520120420 2920120420
26 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] 30 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
diff --git a/auth.c b/auth.c
index cd95da931..976932887 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.95 2012/04/11 13:17:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -357,7 +357,8 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
357char * 357char *
358authorized_principals_file(struct passwd *pw) 358authorized_principals_file(struct passwd *pw)
359{ 359{
360 if (options.authorized_principals_file == NULL) 360 if (options.authorized_principals_file == NULL ||
361 strcasecmp(options.authorized_principals_file, "none") == 0)
361 return NULL; 362 return NULL;
362 return expand_authorized_keys(options.authorized_principals_file, pw); 363 return expand_authorized_keys(options.authorized_principals_file, pw);
363} 364}