FreeBSD Bugzilla – Attachment 82271 Details for
Bug 117687
[patch] fstab(5) format cannot handle spaces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.23 KB, created by
Martin Kammerhofer
on 2007-10-30 19:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Martin Kammerhofer
Created:
2007-10-30 19:20:00 UTC
Size:
2.23 KB
patch
obsolete
>--- /usr/src/lib/libc/gen/fstab.c 2007-10-29 08:58:18.000000000 +0100 >+++ fstab.c 2007-10-29 08:54:56.000000000 +0100 >@@ -49,6 +49,7 @@ > #include <stdlib.h> > #include <string.h> > #include <unistd.h> >+#include <vis.h> > #include "un-namespace.h" > > static FILE *_fs_fp; >@@ -155,9 +156,13 @@ > _fs_fstab.fs_spec = cp; > if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#') > continue; >+ if (strunvis(cp, cp) <= 0) >+ goto bad; > while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') > ; > _fs_fstab.fs_file = cp; >+ if (strunvis(cp, cp) <= 0) >+ goto bad; > fixfsfile(); > while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') > ; >--- /usr/src/share/man/man5/fstab.5 2007-10-29 11:15:18.000000000 +0100 >+++ fstab.5 2007-10-29 11:17:32.000000000 +0100 >@@ -32,7 +32,7 @@ > .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 > .\" $FreeBSD: src/share/man/man5/fstab.5,v 1.26 2004/07/03 18:29:22 ru Exp $ > .\" >-.Dd June 5, 1993 >+.Dd October 29, 2007 > .Dt FSTAB 5 > .Os > .Sh NAME >@@ -64,21 +64,20 @@ > .Pp > The first field, > .Pq Fa fs_spec , >-describes the block special device or >+describes the special device or > remote file system to be mounted. >-For file systems of type >-.Em ufs , >-the special file name is the block special file name, >-and not the character special file name. >-If a program needs the character special file name, >-the program must create it by appending a ``r'' after the >-last ``/'' in the special file name. > .Pp > The second field, > .Pq Fa fs_file , > describes the mount point for the file system. > For swap partitions, this field should be specified as ``none''. > .Pp >+The first and second field are decoded with the >+.Xr strunvis 3 >+function, therefore spaces in the mount point path can be escaped as >+.Ql \e040 >+\&. >+.Pp > The third field, > .Pq Fa fs_vfstype , > describes the type of the file system. >@@ -208,7 +207,7 @@ > #define FSTAB_XX "xx" /* ignore totally */ > > struct fstab { >- char *fs_spec; /* block special device name */ >+ char *fs_spec; /* special device name */ > char *fs_file; /* file system path prefix */ > char *fs_vfstype; /* File system type, ufs, nfs */ > char *fs_mntops; /* Mount options ala -o */ >@@ -242,6 +241,7 @@ > .Xr mount 8 , > .Xr quotacheck 8 , > .Xr quotaon 8 , >+.Xr strunvis 3 , > .Xr swapon 8 , > .Xr umount 8 > .Sh HISTORY
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 117687
: 82271