This is an interesting one. I hope the bug is entirely in user space....
----- Forwarded message from Stoyan Genov <[email protected]> -----
Subject: Bug#239230: nfs-kernel-server: exportfs fails to export a dir with a ``#'' (pound sign) in name even when ``#'' is given as \043
From: Stoyan Genov <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Sun, 21 Mar 2004 18:54:14 -0500
X-Mailer: reportbug 2.48
Package: nfs-kernel-server
Version: 1:1.0.6-1
Severity: normal
According to exports(5):
[snip]
Blank lines are ignored. A pound sign ("#") introduces a comment to
the end of the line. Entries may be continued across newlines using a
backslash. If an export name contains spaces it should be quoted using
double quotes. You can also specify spaces or other unusual character
in the export name using a backslash followed by the character code as
three octal digits.
[snip]
However:
fin-rst:~# uname -a
Linux fin-rst 2.6.3-1-686 #2 Tue Feb 24 20:24:38 EST 2004 i686 GNU/Linux
fin-rst:~# ls -ld '/weird-dir-#'
drwxr-xr-x 2 root root 48 Mar 20 20:21 /weird-dir-#
fin-rst:~# grep -v '^#' /etc/exports
/weird-dir-\043 *(ro)
fin-rst:~# exportfs -r
exportfs: /etc/exports [4]: No 'sync' or 'async' option specified for export "*:/weird-dir-#".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
fin-rst:~# showmount -e localhost
Export list for localhost:
/weird-dir- (everyone)
^
-----------| note that the # is missing
fin-rst:~# mount 'localhost:/weird-dir-#' /mnt
mount: localhost:/weird-dir-# failed, reason given by server: Permission denied
In my humble opinion, either the documentation must be fixed to
explicitly state you cannot export a directory with a pound sign in its
name, or the parser of /etc/exports be fixed ( latter is better :-) )
Best Regards,
Stoyan Genov
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.3-1-686
Locale: LANG=C, LC_CTYPE=C
Versions of packages nfs-kernel-server depends on:
ii debconf 1.4.16 Debian configuration management sy
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
ii libwrap0 7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii nfs-common 1:1.0.6-1 NFS support files common to client
ii sysvinit 2.85-9 System-V like init.
-- debconf information excluded
----- End forwarded message -----
--
Chip Salzenberg - a.k.a. - <[email protected]>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Sun, Mar 21, 2004 at 12:13:25PM -0500, Chip Salzenberg wrote:
> Blank lines are ignored. A pound sign ("#") introduces a comment to
> the end of the line.
So
/weird-dir-# *(ro)
is parsed as
/weird-dir-
which is an export to the whole wide world with default options.
He should try /weird-dir-\#
Olaf
--
Olaf Kirch | Stop wasting entropy - start using predictable
[email protected] | tempfile names today!
---------------+
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Mon, Mar 22, 2004 at 10:53:58AM +0100, Olaf Kirch wrote:
> On Sun, Mar 21, 2004 at 12:13:25PM -0500, Chip Salzenberg wrote:
> > Blank lines are ignored. A pound sign ("#") introduces a comment to
> > the end of the line.
>
> He should try /weird-dir-\#
IMO it is better to recognize comment only when the '#' is preceded by
white space (or start of line), similar to what /bin/sh does.
--
Frank
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs