Bug 196205 - Strange autofs behaviour
Summary: Strange autofs behaviour
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Moyer
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-21 20:47 UTC by Piergiorgio Sartor
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-06-21 21:19:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Piergiorgio Sartor 2006-06-21 20:47:08 UTC
Description of problem:
Let's say there is a machine exporting a directory tree via NFS.
We will call the machine "server", with IP 192.168.0.10, the
tree will be /usr/local/data.
The file /etc/exportfs contains only the client addresses, 192.168.0.2
and 192.168.0.3, something like:

/usr/local/data 192.168.0.2(ro,sync) 192.168.0.3(ro,sync)

Evertyhing works fine on the client, which can automount:

/net/server/usr/local/data

without any issue.

By chance, autofs runs also on "server", and, despite the NFS
configuration, which should allow only 192.168.0.2/3 (I guess),
it is possible to access:

/net/server/usr/local/data

which is mount as:

/usr/local/data on /net/server/usr/local/data type none (rw,bind)

Either I'm missing some details, or something is fishy here.
First, NFS exports only to 192.168.0.2/3 and not to "server".
Second autofs (on "server") mounts in /net a local filesystem,
/usr/local/data does not seems to be NFS mounted. This could be
verified by the "mount" command that does _not_ reports:

server:/usr/local/data on /net/server/usr/local/data ...

which it does on the client.
Hence, autofs does not mounts only network shares on /net, but
also a local one (which should eventually go into /misc), which
might be wrong.

Version-Release number of selected component (if applicable):
autofs-4.1.4-27
kernel-2.6.16-1.2133_FC5

How reproducible:
Always, on different computers.

Steps to Reproduce:
1.
Install and enable autofs.
2.
Share a directory tree via NFS, but NOT to the local machine.
3.
Try to mount /net/{local machine}/{tree} on the local machine.
  
Actual results:
The "tree" is mounted locally (not using NFS, it seems).

Expected results:
Nothing should be mounted, eventually an error could be returned.

Additional info:
The autofs configuration is the standard out-of-the-box,
which means only /net is enabled in /etc/auto.master:

#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc  /etc/auto.misc --timeout=60
#/smb   /etc/auto.smb
/net    /etc/auto.net

Furthermore:

showmount -e server

returns:

/usr/local/data 192.168.0.2,192.168.0.3

as it should.

Trying to manually mount, on server, the exported directory tree,
either via NFS or directly, fails, as it should.

Comment 1 Jeff Moyer 2006-06-21 21:19:28 UTC
You can add the option "nosymlink" option to the map entry generated by auto.net
to keep it from performing bind mounts.  The behaviour you described is expected.


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