]> andersk Git - openssh.git/commitdiff
- dtucker@cvs.openbsd.org 2010/01/10 07:15:56
authordtucker <dtucker>
Sun, 10 Jan 2010 08:27:17 +0000 (08:27 +0000)
committerdtucker <dtucker>
Sun, 10 Jan 2010 08:27:17 +0000 (08:27 +0000)
     [auth.c]
     Output a debug if we can't open an existing keyfile.  bz#1694, ok djm@

ChangeLog
auth.c

index 8b419858dc998e58b834694d44b26ccad58926f3..40c9647cbeefd56f936df90ec58bbf64e315414d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@
    - dtucker@cvs.openbsd.org 2010/01/10 03:51:17
      [servconf.c]
      Add ChrootDirectory to sshd.c test-mode output
+   - 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@
 
 20091209
  - (dtucker) Wrap use of IPPROTO_IPV6 in an ifdef for platforms that don't
diff --git a/auth.c b/auth.c
index 3585daadc1c66d5af310cc29b42d299ad2e824b8..a4c31f580fdd35fe0fd091acdd9f1d261b2dc869 100644 (file)
--- 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);
This page took 0.091689 seconds and 5 git commands to generate.