Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202293 - feature enhancement : recursive mount for net-fs/autofs
Summary: feature enhancement : recursive mount for net-fs/autofs
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-14 18:08 UTC by Ben
Modified: 2007-12-14 18:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben 2007-12-14 18:08:14 UTC
I'd like this feature, probably using a USE flag as it may break others' usage model

Basically this patch I found allows autofs to mount subdirectories in subdirectories.  I use it to allow autofs to mount exported partitions under root of the machine specified.

--- autofs-4.1.3/modules/mount_nfs.c.orig       2006-11-07 01:26:44.000000000 -0700
+++ autofs-4.1.3/modules/mount_nfs.c    2006-11-07 01:40:57.000000000 -0700
@@ -437,7 +434,7 @@
                debug(MODPREFIX "calling mkdir_path %s", fullpath);

                status = mkdir_path(fullpath, 0555);
-               if (status && errno != EEXIST) {
+               if (status && errno != EEXIST && errno != EACCES ) {
                        error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
                        return 1;
                }

I've tested under: ia64 x86
but I figure this should work under any architecture.

Reproducible: Always

Steps to Reproduce:
1. set up nfs server with subdirectory submounts

(exports looks like:)
/ 10.0.0.2/255.0.0.0(rw,sync,root_squash)
/home 10.0.0.2/255.0.0.0(rw,sync,no_root_squash)

2. Setup autofs to automount this machine
3. cd into that machine/home on another machine
Actual Results:  
Notice that /home won't mount in the default version as it can't, since the directory is unwriteable due to root_squash.

Expected Results:  
With the above patch, /home will be mounted along with the root partition.

I figure this may break some people's systems so I suppose a use flag is necessary.  However I think this is safe, I've been using this on my systems.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-12-14 18:15:40 UTC
Hi, thanks but feature requests need to go upstream, esp. if they create incompatible behaviour. (Pretty much doubt it will be accepted unless you make it a configure option.)

Also, autofs lacks any any active Gentoo maintainer ATM (see http://tinyurl.com/2jd3pf for the pending bugs.)