summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-10 19:27:17 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-10 19:27:17 +1100
commit43551527dc1cc9f18561c4816960440de2ce289b (patch)
tree3d2c537f35e8d6c8ed748f7d3029a4ca178587a4 /auth.c
parentd3300454d84715a921978163895e961d24b6deaa (diff)
- dtucker@cvs.openbsd.org 2010/01/10 07:15:56
[auth.c] Output a debug if we can't open an existing keyfile. bz#1694, ok djm@
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/auth.c b/auth.c
index 3585daadc..a4c31f580 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.80 2008/11/04 07:58:09 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.81 2010/01/10 07:15:56 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -483,8 +483,12 @@ auth_openkeyfile(const char *file, struct passwd *pw, int strict_modes)
483 * Open the file containing the authorized keys 483 * Open the file containing the authorized keys
484 * Fail quietly if file does not exist 484 * Fail quietly if file does not exist
485 */ 485 */
486 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) 486 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
487 if (errno != ENOENT)
488 debug("Could not open keyfile '%s': %s", file,
489 strerror(errno));
487 return NULL; 490 return NULL;
491 }
488 492
489 if (fstat(fd, &st) < 0) { 493 if (fstat(fd, &st) < 0) {
490 close(fd); 494 close(fd);