diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2021-02-14 21:09:58 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2021-02-14 21:09:58 +0000 |
| commit | 3bbd8dc96b4466d8e4f850fc0adf7d02e1df2dc7 (patch) | |
| tree | 755d79f61bc5fe47efc42cd39ac819b2a5cd9390 /authfile.c | |
| parent | db903103f46785ea0bba0f228691e1f8fb3a643d (diff) | |
Vendor import of OpenSSH 8.4p1vendor/openssh/8.4p1
Diffstat (limited to 'authfile.c')
| -rw-r--r-- | authfile.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/authfile.c b/authfile.c index 35ccf576c2b5..946f50ca8114 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.140 2020/04/17 07:15:11 djm Exp $ */ +/* $OpenBSD: authfile.c,v 1.141 2020/06/18 23:33:38 djm Exp $ */ /* * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. * @@ -263,7 +263,7 @@ int sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp) { char *pubfile = NULL; - int r; + int r, oerrno; if (keyp != NULL) *keyp = NULL; @@ -283,8 +283,14 @@ sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp) if ((r = sshkey_load_pubkey_from_private(filename, keyp)) == 0) goto out; + /* Pretend we couldn't find the key */ + r = SSH_ERR_SYSTEM_ERROR; + errno = ENOENT; + out: + oerrno = errno; free(pubfile); + errno = oerrno; return r; } |
