Bug 196205 - Strange autofs behaviour
Strange autofs behaviour
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: autofs (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeffrey Moyer
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-21 16:47 EDT by Piergiorgio Sartor
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-21 17:19:28 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 Piergiorgio Sartor 2006-06-21 16:47:08 EDT
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 Jeffrey Moyer 2006-06-21 17:19:28 EDT
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.