upstream: skip more whitespace, fixes find-principals on
allowed_signers files with blank lines; reported by Wiktor Kwapisiewicz OpenBSD-Commit-ID: b3a22a2afd753d70766f34bc7f309c03706b5298
This commit is contained in:
parent
2f9d2af5cb
commit
cd82f7526e
4
sshsig.c
4
sshsig.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sshsig.c,v 1.34 2023/12/08 09:18:39 markus Exp $ */
|
/* $OpenBSD: sshsig.c,v 1.35 2024/03/08 22:16:32 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Google LLC
|
* Copyright (c) 2019 Google LLC
|
||||||
*
|
*
|
||||||
|
@ -746,7 +746,7 @@ parse_principals_key_and_options(const char *path, u_long linenum, char *line,
|
||||||
*keyp = NULL;
|
*keyp = NULL;
|
||||||
|
|
||||||
cp = line;
|
cp = line;
|
||||||
cp = cp + strspn(cp, " \t"); /* skip leading whitespace */
|
cp = cp + strspn(cp, " \t\n\r"); /* skip leading whitespace */
|
||||||
if (*cp == '#' || *cp == '\0')
|
if (*cp == '#' || *cp == '\0')
|
||||||
return SSH_ERR_KEY_NOT_FOUND; /* blank or all-comment line */
|
return SSH_ERR_KEY_NOT_FOUND; /* blank or all-comment line */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue