FreeBSD Bugzilla – Attachment 169588 Details for
Bug 208663
It is not possible to use spaces in fstab paths when using jails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use strunvis to escape fstab characters
jail_fstab.diff (text/plain), 773 bytes, created by
Jamie Gritton
on 2016-04-23 02:16:39 UTC
(
hide
)
Description:
Use strunvis to escape fstab characters
Filename:
MIME Type:
Creator:
Jamie Gritton
Created:
2016-04-23 02:16:39 UTC
Size:
773 bytes
patch
obsolete
>Index: usr.sbin/jail/ccommand.c >=================================================================== >--- usr.sbin/jail/ccommand.c (revision 298494) >+++ usr.sbin/jail/ccommand.c (working copy) >@@ -47,6 +47,7 @@ > #include <stdlib.h> > #include <string.h> > #include <unistd.h> >+#include <vis.h> > > #include "jailp.h" > >@@ -444,8 +445,14 @@ > strcpy(comcs, comstring->s); > argc = 0; > for (cs = strtok(comcs, " \t\f\v\r\n"); cs && argc < 4; >- cs = strtok(NULL, " \t\f\v\r\n")) >+ cs = strtok(NULL, " \t\f\v\r\n")) { >+ if (argc <= 1 && strunvis(cs, cs) < 0) { >+ jail_warnx(j, "%s: %s: fstab parse error", >+ j->intparams[comparam]->name, comstring->s); >+ return -1; >+ } > argv[argc++] = cs; >+ } > if (argc == 0) > return 0; > if (argc < 3) {
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 208663
: 169588