diff options
author | 2010-01-10 07:15:56 +0000 | |
---|---|---|
committer | 2010-01-10 07:15:56 +0000 | |
commit | 5acfae65ad2c374fe66b9d1b5fe68b60201dcf31 (patch) | |
tree | 39c4f64355996e705c2e2ea700612e5a75d8ca9d /usr.bin/ssh/auth.c | |
parent | GCC doesn't respect the aligned attribute for automatic variables. So (diff) | |
download | wireguard-openbsd-5acfae65ad2c374fe66b9d1b5fe68b60201dcf31.tar.xz wireguard-openbsd-5acfae65ad2c374fe66b9d1b5fe68b60201dcf31.zip |
Output a debug if we can't open an existing keyfile. bz#1694, ok djm@
Diffstat (limited to 'usr.bin/ssh/auth.c')
-rw-r--r-- | usr.bin/ssh/auth.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c index acc77c3b610..e99c67964e3 100644 --- a/usr.bin/ssh/auth.c +++ b/usr.bin/ssh/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. * @@ -393,8 +393,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); |