View | Details | Raw Unified | Return to bug 482 | Differences between
and this patch

Collapse All | Expand All

(-)misc.c (-1 / +14 lines)
Lines 126-131 set_nodelay(int fd) Link Here
126
126
127
/* Characters considered whitespace in strsep calls. */
127
/* Characters considered whitespace in strsep calls. */
128
#define WHITESPACE " \t\r\n"
128
#define WHITESPACE " \t\r\n"
129
#define QUOTE	"\""
129
130
130
/* return next token in configuration line */
131
/* return next token in configuration line */
131
char *
132
char *
Lines 139-153 strdelim(char **s) Link Here
139
140
140
	old = *s;
141
	old = *s;
141
142
142
	*s = strpbrk(*s, WHITESPACE "=");
143
	*s = strpbrk(*s, WHITESPACE QUOTE "=");
143
	if (*s == NULL)
144
	if (*s == NULL)
144
		return (old);
145
		return (old);
145
146
147
	if (*s[0] == '\"') {
148
		memmove(*s, *s + 1, strlen(*s)); /* move nul too */
149
		/* Find matching quote */
150
		if ((*s = strpbrk(*s, QUOTE)) == NULL) {
151
			return (NULL);		/* no matching quote */
152
		} else {
153
			*s[0] = '\0';
154
			return (old);
155
		}
156
	}
157
146
	/* Allow only one '=' to be skipped */
158
	/* Allow only one '=' to be skipped */
147
	if (*s[0] == '=')
159
	if (*s[0] == '=')
148
		wspace = 1;
160
		wspace = 1;
149
	*s[0] = '\0';
161
	*s[0] = '\0';
150
162
163
	/* Skip any extra whitespace after first token */
151
	*s += strspn(*s + 1, WHITESPACE) + 1;
164
	*s += strspn(*s + 1, WHITESPACE) + 1;
152
	if (*s[0] == '=' && !wspace)
165
	if (*s[0] == '=' && !wspace)
153
		*s += strspn(*s + 1, WHITESPACE) + 1;
166
		*s += strspn(*s + 1, WHITESPACE) + 1;
(-)ssh_config.5 (+2 lines)
Lines 127-132 and Link Here
127
.Nm sftp
127
.Nm sftp
128
.Fl o
128
.Fl o
129
option.
129
option.
130
Arguments may optionally be enclosed in double quotes
131
in order to represent arguments containing spaces.
130
.Pp
132
.Pp
131
The possible
133
The possible
132
keywords and their meanings are as follows (note that
134
keywords and their meanings are as follows (note that
(-)sshd_config.5 (+2 lines)
Lines 56-61 The file contains keyword-argument pairs Link Here
56
Lines starting with
56
Lines starting with
57
.Ql #
57
.Ql #
58
and empty lines are interpreted as comments.
58
and empty lines are interpreted as comments.
59
Arguments may optionally be enclosed in double quotes
60
in order to represent arguments containing spaces.
59
.Pp
61
.Pp
60
The possible
62
The possible
61
keywords and their meanings are as follows (note that
63
keywords and their meanings are as follows (note that

Return to bug 482