Bug 192939 - Autofs cannot mount nfs exports with escaped whitespaces
Autofs cannot mount nfs exports with escaped whitespaces
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeffrey Moyer
Brock Organ
:
Depends On:
Blocks: 190430
  Show dependency treegraph
 
Reported: 2006-05-24 09:12 EDT by Joris van Steen
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0416
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-11 14:45:31 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)
Section of messages file (1.09 KB, text/plain)
2006-06-07 03:20 EDT, Joris van Steen
no flags Details
Automount table. (46 bytes, text/plain)
2006-06-07 03:24 EDT, Joris van Steen
no flags Details
Fix the mounting of directories with spaces (1.01 KB, patch)
2006-06-07 11:10 EDT, Jeffrey Moyer
no flags Details | Diff
Correction to previous patch for space handling in get_best_mount - lest we forget (417 bytes, patch)
2006-06-23 09:51 EDT, Ian Kent
no flags Details | Diff
Correction to previous patch for space handling in get_best_mount - lest we forget (417 bytes, patch)
2006-06-23 09:51 EDT, Ian Kent
no flags Details | Diff
Test package with white space fixes. (235.79 KB, application/x-rpm)
2006-06-23 11:05 EDT, Jeffrey Moyer
no flags Details

  None (edit)
Description Joris van Steen 2006-05-24 09:12:32 EDT
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.
Comment 1 Jeffrey Moyer 2006-06-06 13:58:18 EDT
Yes, this is a known problem.  I'll look into it.
Comment 2 Jeffrey Moyer 2006-06-06 14:19:21 EDT
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.
Comment 3 Joris van Steen 2006-06-07 03:20:13 EDT
Created attachment 130659 [details]
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.
Comment 4 Joris van Steen 2006-06-07 03:24:01 EDT
Created attachment 130660 [details]
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
Comment 5 Jeffrey Moyer 2006-06-07 09:19:22 EDT
OK, I have been able to reproduce this.  Thanks!
Comment 6 Jeffrey Moyer 2006-06-07 11:10:23 EDT
Created attachment 130684 [details]
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 7 Ian Kent 2006-06-23 09:51:31 EDT
Created attachment 131430 [details]
Correction to previous patch for space handling in get_best_mount - lest we forget
Comment 8 Ian Kent 2006-06-23 09:51:42 EDT
Created attachment 131431 [details]
Correction to previous patch for space handling in get_best_mount - lest we forget
Comment 9 Joris van Steen 2006-06-23 10:19:36 EDT
Could you attach the package again ? I was not able to download the last one
because of the bugzilla crash.

If you require me to add the attachments, that were lost after the crash, please
let me know.

Thanks !
Comment 10 Jeffrey Moyer 2006-06-23 11:05:32 EDT
Created attachment 131441 [details]
Test package with white space fixes.

Please give this package a try.  Note that this package will NOT be supported
by Red Hat;  it's just a test package to verify the problem is fixed.

Thanks!
Comment 11 Joris van Steen 2006-06-29 07:38:19 EDT
We've tested the package with the same automount tables we've used before and
everything works perfect.

As far as I can see this patch fixes our problem.

Thanks.
Comment 12 Jeffrey Moyer 2006-09-12 08:56:42 EDT
A fix for this issue was built into autofs version 4.1.3-190.  Test rpms are
available at the following URL:
  http://people.redhat.com/jmoyer/autofs/rhel4/4.1.3-190
Comment 13 Jeffrey Moyer 2007-01-17 12:34:45 EST
I fixed this in the RHEL 4 tree, but now I see that the bug is filed against
RHEL 3.  I'm setting this back to assigned so that this gets addressed.
Comment 14 Jeffrey Moyer 2007-01-17 19:19:49 EST
A fix for this issue will appear in autofs version 4.1.3-206 and later.
Comment 21 Red Hat Bugzilla 2007-06-11 14:45:31 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-0416.html

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