diff options
author | Damien Miller <djm@mindrot.org> | 2003-05-14 13:40:54 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-05-14 13:40:54 +1000 |
commit | c652cac5f75590a4df536fb69713ba506082f5f4 (patch) | |
tree | ea172e22cb2ceb28e3cc08a46626655bc1edaed9 | |
parent | d558092522153caa627e33e4a76c6f64332bc609 (diff) |
- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2003/04/09 12:00:37
[readconf.c]
strip trailing whitespace from config lines before parsing.
Fixes bz 528; ok markus@
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | readconf.c | 9 |
2 files changed, 14 insertions, 2 deletions
@@ -1,6 +1,11 @@ | |||
1 | 20030514 | 1 | 20030514 |
2 | - (djm) Bug #117: Don't lie to PAM about username | 2 | - (djm) Bug #117: Don't lie to PAM about username |
3 | - (djm) RCSID sync w/ OpenBSD | 3 | - (djm) RCSID sync w/ OpenBSD |
4 | - (djm) OpenBSD CVS Sync | ||
5 | - djm@cvs.openbsd.org 2003/04/09 12:00:37 | ||
6 | [readconf.c] | ||
7 | strip trailing whitespace from config lines before parsing. | ||
8 | Fixes bz 528; ok markus@ | ||
4 | 9 | ||
5 | 20030512 | 10 | 20030512 |
6 | - (djm) Redhat spec: Don't install profile.d scripts when not | 11 | - (djm) Redhat spec: Don't install profile.d scripts when not |
@@ -1388,4 +1393,4 @@ | |||
1388 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 1393 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
1389 | ok provos@ | 1394 | ok provos@ |
1390 | 1395 | ||
1391 | $Id: ChangeLog,v 1.2677 2003/05/14 03:40:06 djm Exp $ | 1396 | $Id: ChangeLog,v 1.2678 2003/05/14 03:40:54 djm Exp $ |
diff --git a/readconf.c b/readconf.c index a10427086..acdf128f6 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: readconf.c,v 1.105 2003/04/02 09:48:07 markus Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.106 2003/04/09 12:00:37 djm Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -282,6 +282,13 @@ process_config_line(Options *options, const char *host, | |||
282 | u_short fwd_port, fwd_host_port; | 282 | u_short fwd_port, fwd_host_port; |
283 | char sfwd_host_port[6]; | 283 | char sfwd_host_port[6]; |
284 | 284 | ||
285 | /* Strip trailing whitespace */ | ||
286 | for(len = strlen(line) - 1; len > 0; len--) { | ||
287 | if (strchr(WHITESPACE, line[len]) == NULL) | ||
288 | break; | ||
289 | line[len] = '\0'; | ||
290 | } | ||
291 | |||
285 | s = line; | 292 | s = line; |
286 | /* Get the keyword. (Each line is supposed to begin with a keyword). */ | 293 | /* Get the keyword. (Each line is supposed to begin with a keyword). */ |
287 | keyword = strdelim(&s); | 294 | keyword = strdelim(&s); |