diff options
author | 2011-05-10 05:46:46 +0000 | |
---|---|---|
committer | 2011-05-10 05:46:46 +0000 | |
commit | 1ff5a3f05cc254e4645cd2eca78e2bb5dd5cf536 (patch) | |
tree | e0b30c8e2b40a885557bb6853fcc55d83a8d956a /usr.bin/ssh/authfile.c | |
parent | Fix previous. On i386, library.c isn't compiled (diff) | |
download | wireguard-openbsd-1ff5a3f05cc254e4645cd2eca78e2bb5dd5cf536.tar.xz wireguard-openbsd-1ff5a3f05cc254e4645cd2eca78e2bb5dd5cf536.zip |
despam debug() logs by detecting that we are trying to load a private key
in key_try_load_public() and returning early; ok markus@
Diffstat (limited to 'usr.bin/ssh/authfile.c')
-rw-r--r-- | usr.bin/ssh/authfile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c index dae41798aba..116c680338a 100644 --- a/usr.bin/ssh/authfile.c +++ b/usr.bin/ssh/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.88 2011/05/04 21:15:29 djm Exp $ */ +/* $OpenBSD: authfile.c,v 1.89 2011/05/10 05:46:46 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -749,6 +749,9 @@ key_try_load_public(Key *k, const char *filename, char **commentp) case '\0': continue; } + /* Abort loading if this looks like a private key */ + if (strncmp(cp, "-----BEGIN", 10) == 0) + break; /* Skip leading whitespace. */ for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) ; |