Bug 194364 - Autofs cannot mount nfs exports with escaped whitespaces
Autofs cannot mount nfs exports with escaped whitespaces
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs (Show other bugs)
4.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Moyer
Brock Organ
:
Depends On:
Blocks: 176344
  Show dependency treegraph
 
Reported: 2006-06-07 11:17 EDT by Jeff Moyer
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0274
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-07 19:24:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Moyer 2006-06-07 11:17:28 EDT
+++ This bug was initially created as a clone of Bug #192939 +++

Description of problem:
Entries in an automount table that contain whitespaces escaped by a backslash
are not properly passed through to the mount command.


Version-Release number of selected component (if applicable):
4.1.3-47

How reproducible:

Steps to Reproduce:
1. Create an NFS export that contains a whitespace on a nfs server
(for example "/export/share/dir with whitespace")
2. Create an automount table that mounts this export with whitespaces escaped
out by a backslash. Example entry
dir\ with\ whitespace     fileserver:/export/share/dir\ with\ whitespace
3. Add this automount table to to /etc/master.
4. Restart autofs
5. Change directory to the auto mounted filesystem
  
Actual results:
When you change directory to the auto mounted file system you get the message
"cd: dir with whitespace: No such file or directory"

And the following entry is created in the syslog

May 24 16:44:51 pc100575 automount[8160]: >> mount: fileserver:/export/share/dir
failed, reason given by server: Permission denied
May 24 16:44:51 pc100575 automount[8160]: mount(nfs): nfs: mount failure
fileserver:/export/share/dir on /test/dir with whitespace
May 24 16:44:51 pc100575 automount[8160]: failed to mount /test/dir with whitespace


Expected results:
The mount should have been successful.

Additional info:

The problem has also been reproduced with autofs 4.1.4

It is possible to mount an nfs exported file system with whitespaces in it on
Linux. The whitespace character is not a reserved character for nfs exported
file systems.
We also use Sun Solaris which has no problems with escaped whitespace in
automount tables. We want to use the same NFS exports and mountpoints on Linux
as we do on Solaris.

-- Additional comment from jmoyer@redhat.com on 2006-06-06 13:58 EST --
Yes, this is a known problem.  I'll look into it.

-- Additional comment from jmoyer@redhat.com on 2006-06-06 14:19 EST --
Actually, I just tried this and it worked.  Could you post your maps, please? 
Be sure it's the exact maps you are using when experiencing the problem.

Thanks.

-- Additional comment from Joris.van.Steen@asml.com on 2006-06-07 03:20 EST --
Created an attachment (id=130659)
Section of messages file

The messages in the log file that are created by autofs.

The permission denied in the "reason for failure" messages is generated by our
file server when it get a request for a non existant directory. The file server
is a network appliance filer running data ontap 7.0.4p4. With support for nfs
v4.

-- Additional comment from Joris.van.Steen@asml.com on 2006-06-07 03:24 EST --
Created an attachment (id=130660)
Automount table.

This is the automount table I used for testing.

It is possible to mount the nfs export "nlvdhs99:/vol/share01/vfm/test\ dir"
manually with the following mount command.

mount nlvdhs99:/vol/share01/vfm/test\ dir /mnt


-- Additional comment from jmoyer@redhat.com on 2006-06-07 09:19 EST --
OK, I have been able to reproduce this.  Thanks!

-- Additional comment from jmoyer@redhat.com on 2006-06-07 11:10 EST --
Created an attachment (id=130684)
Fix the mounting of directories with spaces

This patch fixes the problem in my environment.  Could you please test it out? 
If you would like me to build a package for you, please let me know which
architecture you are interested in.

Thanks!
Comment 1 RHEL Product and Program Management 2006-08-18 11:37:27 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 3 Jeff Moyer 2006-09-14 13:43:13 EDT
A fix for this was built into autofs-4.1.3-190.  Test packages are available for
this and later version on my people page, in the following directory:
  http://people.redhat.com/jmoyer/autofs/rhel4/

Please test the latest package version available there.

Thanks.
Comment 7 Red Hat Bugzilla 2007-05-07 19:24:47 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0274.html

Note You need to log in before you can comment on or make changes to this bug.