Bugzilla – Attachment 1038 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]
Allow embedded spaces in tokens by preceding with a backslash
openssh-token-escape.patch (text/plain), 1.03 KB, created by
Darren Tucker
on 2005-12-13 21:57:26 AEDT
(
hide
)
Description:
Allow embedded spaces in tokens by preceding with a backslash
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2005-12-13 21:57:26 AEDT
Size:
1.03 KB
patch
obsolete
>Index: misc.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/misc.c,v >retrieving revision 1.53 >diff -u -p -r1.53 misc.c >--- misc.c 13 Dec 2005 09:44:13 -0000 1.53 >+++ misc.c 13 Dec 2005 10:44:06 -0000 >@@ -125,22 +125,32 @@ char * > strdelim(char **s) > { > char *old; >- int wspace = 0; >+ int cont, wspace = 0; > > if (*s == NULL) > return NULL; > > old = *s; > >- *s = strpbrk(*s, WHITESPACE "="); >- if (*s == NULL) >- return (old); >+ do { >+ cont = 0; >+ *s = strpbrk(*s, WHITESPACE "=\\"); >+ if (*s == NULL) >+ return (old); >+ /* If we found a backslash, remove it and skip next char */ >+ if (*s[0] == '\\' && *s[1] != '\0') { >+ cont = 1; >+ memmove(*s, *s + 1, strlen(*s) - 1); >+ s++; >+ } >+ } while (cont); > > /* 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;
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