All of lore.kernel.org
 help / color / mirror / Atom feed
* [sdg@dir.bg: Bug#239230: nfs-kernel-server: exportfs fails to export a dir with a ``#'' (pound sign) in name even when ``#'' is given as \043]
@ 2004-03-21 17:13 Chip Salzenberg
  2004-03-22  9:53 ` Olaf Kirch
  0 siblings, 1 reply; 3+ messages in thread
From: Chip Salzenberg @ 2004-03-21 17:13 UTC (permalink / raw)
  To: nfs

This is an interesting one.  I hope the bug is entirely in user space....

----- Forwarded message from Stoyan Genov <sdg@dir.bg> -----

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 <sdg@dir.bg>
To: Debian Bug Tracking System <submit@bugs.debian.org>
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. -               <chip@pobox.com>
"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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sdg@dir.bg: Bug#239230: nfs-kernel-server: exportfs fails to export a dir with a ``#'' (pound sign) in name even when ``#'' is given as \043]
  2004-03-21 17:13 [sdg@dir.bg: Bug#239230: nfs-kernel-server: exportfs fails to export a dir with a ``#'' (pound sign) in name even when ``#'' is given as \043] Chip Salzenberg
@ 2004-03-22  9:53 ` Olaf Kirch
  2004-03-22 11:28   ` Frank van Maarseveen
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Kirch @ 2004-03-22  9:53 UTC (permalink / raw)
  To: Chip Salzenberg; +Cc: 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
okir@suse.de   |  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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sdg@dir.bg: Bug#239230: nfs-kernel-server: exportfs fails to export a dir with a ``#'' (pound sign) in name even when ``#'' is given as \043]
  2004-03-22  9:53 ` Olaf Kirch
@ 2004-03-22 11:28   ` Frank van Maarseveen
  0 siblings, 0 replies; 3+ messages in thread
From: Frank van Maarseveen @ 2004-03-22 11:28 UTC (permalink / raw)
  To: 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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-22 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-21 17:13 [sdg@dir.bg: Bug#239230: nfs-kernel-server: exportfs fails to export a dir with a ``#'' (pound sign) in name even when ``#'' is given as \043] Chip Salzenberg
2004-03-22  9:53 ` Olaf Kirch
2004-03-22 11:28   ` Frank van Maarseveen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.