projects
/
apps
/
pfixtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5863c0
)
Strip whitespace for secrets
author
Pierre Habouzit
<madcoder@debian.org>
Wed, 29 Aug 2007 21:10:23 +0000
(23:10 +0200)
committer
Pierre Habouzit
<madcoder@debian.org>
Wed, 29 Aug 2007 21:10:23 +0000
(23:10 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
srsd.c
patch
|
blob
|
history
diff --git
a/srsd.c
b/srsd.c
index
0ee15ca
..
cd53c9e
100644
(file)
--- a/
srsd.c
+++ b/
srsd.c
@@
-349,12
+349,12
@@
static srs_t *srs_read_secrets(const char *sfile)
int n = strlen(buf);
++lineno;
- if (buf[n - 1] != '\n') {
+ if (
n == sizeof(buf) - 1 &&
buf[n - 1] != '\n') {
syslog(LOG_CRIT, "%s:%d: line too long", sfile, lineno);
goto error;
}
-
- srs_add_secret(srs,
buf
);
+ m_strrtrim(buf);
+ srs_add_secret(srs,
skipspaces(buf)
);
}
if (!lineno) {