Bug 207596 - automount /net ("hosts") doesn't handle shares with spaces
Summary: automount /net ("hosts") doesn't handle shares with spaces
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Edward Tomasz Napierala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-29 15:24 UTC by Justin Hibbits
Modified: 2016-11-04 14:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer freebsd_triage 2016-02-29 15:24:16 UTC
I have a shared directory on a NAS with a space in it, which causes automount to not recognize the directory.  It ends up mounting on the name "/net/.../FirstWord", which doesn't exist on the NAS.  It looks to be a simple quoting issue in /etc/autofs/special_hosts, though adding '\"' around the two '%s' formatters for $1 in the awk script caused I/O errors, and I haven't debugged any further.
Comment 1 Edward Tomasz Napierala freebsd_committer freebsd_triage 2016-03-16 10:39:58 UTC
Do you happen to know how to export a share with spaces using FreeBSD?
Comment 2 Edward Tomasz Napierala freebsd_committer freebsd_triage 2016-03-16 11:38:04 UTC
Could you take a look at https://reviews.freebsd.org/D5649?
Comment 3 Edward Tomasz Napierala freebsd_committer freebsd_triage 2016-09-12 10:28:47 UTC
Fixed in r297207.
Comment 4 Justin Hibbits freebsd_committer freebsd_triage 2016-09-14 23:27:20 UTC
I think this can be closed, if it's been fixed?
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-11-04 14:06:40 UTC
A commit references this bug:

Author: trasz
Date: Fri Nov  4 14:06:21 UTC 2016
New revision: 308292
URL: https://svnweb.freebsd.org/changeset/base/308292

Log:
  MFC r297207:

  Make the autofs(5) -hosts map more robust, primarily to make it correctly
  handle NFS shares containing whitespace. This also adds the -E parameter
  to showmount(8).

  PR:		207596
  Differential Revision:	https://reviews.freebsd.org/D5649

Changes:
_U  stable/10/
  stable/10/etc/autofs/special_hosts
  stable/10/usr.bin/showmount/showmount.8
  stable/10/usr.bin/showmount/showmount.c