diff options
author | Damien Miller <djm@mindrot.org> | 2011-05-15 08:50:32 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-05-15 08:50:32 +1000 |
commit | 3219824f2d8b0ea1711818745b046931ffcd3918 (patch) | |
tree | 7b88e39e961a8be1ba4f6cafb8c20bfd121c253a /authfile.c | |
parent | 555f3b856f2681b46870a66386396b49426b9719 (diff) |
- djm@cvs.openbsd.org 2011/05/10 05:46:46
[authfile.c]
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 'authfile.c')
-rw-r--r-- | authfile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/authfile.c b/authfile.c index 608d1d06f..7a5b65142 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfile.c,v 1.88 2011/05/04 21:15:29 djm Exp $ */ | 1 | /* $OpenBSD: authfile.c,v 1.89 2011/05/10 05:46:46 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -765,6 +765,9 @@ key_try_load_public(Key *k, const char *filename, char **commentp) | |||
765 | case '\0': | 765 | case '\0': |
766 | continue; | 766 | continue; |
767 | } | 767 | } |
768 | /* Abort loading if this looks like a private key */ | ||
769 | if (strncmp(cp, "-----BEGIN", 10) == 0) | ||
770 | break; | ||
768 | /* Skip leading whitespace. */ | 771 | /* Skip leading whitespace. */ |
769 | for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) | 772 | for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) |
770 | ; | 773 | ; |