Bugzilla – Attachment 1084 Details for
Bug 482
readconf doesn't accept paths with spaces in them
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Support double-quoting of config arguments
openssh-config-quotes.patch (text/plain), 2.17 KB, created by
Darren Tucker
on 2006-02-26 14:28:03 AEDT
(
hide
)
Description:
Support double-quoting of config arguments
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2006-02-26 14:28:03 AEDT
Size:
2.17 KB
patch
obsolete
>Index: misc.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/misc.c,v >retrieving revision 1.45 >diff -u -p -r1.45 misc.c >--- misc.c 2006/02/10 00:27:13 1.45 >+++ misc.c 2006/02/26 03:22:57 >@@ -126,6 +126,7 @@ set_nodelay(int fd) > > /* Characters considered whitespace in strsep calls. */ > #define WHITESPACE " \t\r\n" >+#define QUOTE "\"" > > /* return next token in configuration line */ > char * >@@ -139,15 +140,27 @@ strdelim(char **s) > > old = *s; > >- *s = strpbrk(*s, WHITESPACE "="); >+ *s = strpbrk(*s, WHITESPACE QUOTE "="); > if (*s == NULL) > return (old); > >+ if (*s[0] == '\"') { >+ memmove(*s, *s + 1, strlen(*s)); /* move nul too */ >+ /* Find matching quote */ >+ if ((*s = strpbrk(*s, QUOTE)) == NULL) { >+ return (NULL); /* no matching quote */ >+ } else { >+ *s[0] = '\0'; >+ return (old); >+ } >+ } >+ > /* Allow only one '=' to be skipped */ > if (*s[0] == '=') > wspace = 1; > *s[0] = '\0'; > >+ /* Skip any extra whitespace after first token */ > *s += strspn(*s + 1, WHITESPACE) + 1; > if (*s[0] == '=' && !wspace) > *s += strspn(*s + 1, WHITESPACE) + 1; >Index: ssh_config.5 >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh_config.5,v >retrieving revision 1.85 >diff -u -p -r1.85 ssh_config.5 >--- ssh_config.5 2006/02/25 12:26:17 1.85 >+++ ssh_config.5 2006/02/26 03:22:58 >@@ -127,6 +127,8 @@ and > .Nm sftp > .Fl o > option. >+Arguments may optionally be enclosed in double quotes >+in order to represent arguments containing spaces. > .Pp > The possible > keywords and their meanings are as follows (note that >Index: sshd_config.5 >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/sshd_config.5,v >retrieving revision 1.54 >diff -u -p -r1.54 sshd_config.5 >--- sshd_config.5 2006/02/25 12:28:34 1.54 >+++ sshd_config.5 2006/02/26 03:22:58 >@@ -56,6 +56,8 @@ The file contains keyword-argument pairs > Lines starting with > .Ql # > and empty lines are interpreted as comments. >+Arguments may optionally be enclosed in double quotes >+in order to represent arguments containing spaces. > .Pp > The possible > keywords and their meanings are as follows (note that
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 482
:
1038
|
1039
|
1040
|
1041
| 1084