summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authordtucker <dtucker>2010-01-10 08:27:17 +0000
committerdtucker <dtucker>2010-01-10 08:27:17 +0000
commit4ff0a16465939906323a9f10ee2ec5b8027f01a1 (patch)
tree9ab09a0bf8aeb8fc09cc02de3df472d27a9e84fd /auth.c
parentefcb3db6f03286ea3b52d4768d123047999154ec (diff)
downloadopenssh-4ff0a16465939906323a9f10ee2ec5b8027f01a1.tar.gz
- 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 3585daad..a4c31f58 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.80 2008/11/04 07:58:09 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.81 2010/01/10 07:15:56 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -483,8 +483,12 @@ auth_openkeyfile(const char *file, struct passwd *pw, int strict_modes)
* Open the file containing the authorized keys
* Fail quietly if file does not exist
*/
- if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1)
+ if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
+ if (errno != ENOENT)
+ debug("Could not open keyfile '%s': %s", file,
+ strerror(errno));
return NULL;
+ }
if (fstat(fd, &st) < 0) {
close(fd);