Public bug reported:

Binary package hint: autofs

System info:
Description:    Ubuntu 8.04.1
Release:        8.04
autofs:
  Installed: 4.1.4+debian-2.1ubuntu1
  Candidate: 4.1.4+debian-2.1ubuntu1
  Version table:
 *** 4.1.4+debian-2.1ubuntu1 0
        500 http://us.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status


Autofs fails to mount a remote file system if the remote path contains a space. 
 On the remote NFS server, syslog reports that it can't stat exported dir and 
then prints the requested remote path ending at (before) the space.  There is 
no way to use autofs to mount a remote directory containing a space through any 
combination of quoting or escaping.  Using command-line "mount" command works 
fine when the remote path is quoted.  Autofs calls the "mount" command for the 
actual mounting operation, so the problem is in autofs's preparation of the 
remote path argument to "mount".

Cause: in autofs source file mount_nfs.c, in function get_best_mount(),
remote path is copied until space or end of string.  If the remote path
contains a space, the string is terminated before the space.  This
shortened string is then passed to the "mount" program as the remote
path to be mounted on the local mount point.

To duplicate:
1) Export a file system on the remote system, and make a directory underneath 
the top level of the exported file system that contains a space.  Example:
remote% cat /etc/exports
/export

remote% mkdir "/export/data/path with space"

2) On the local system, set up an automount map that maps to the remote
file system, and start autofs.  Mount map example:

local% cat /etc/auto.master
/data   /etc/auto.data  defaults,intr

local%cat /etc/auto.data
*   remote:/export/data/&

3) Attempt to access the local path:
local% ls "/data/path with space"
/bin/ls: cannot access /data/path with space: No such file or directory

On the remote machine's syslog:
Dec  8 16:25:24 remote nss_wins[801]: can't stat exported dir 
/export/data/path: No such file or directory

** Affects: autofs (Ubuntu)
     Importance: Undecided
         Status: New

-- 
autofs cannot mount remote directory path with space
https://bugs.launchpad.net/bugs/306369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to