autofs-5.0.3 - allow directory create on NFS root From: Matthias Koenig autofs will not create the autofs mountpoint path if the filesystem is not a locally mounted filesystem (e.g. a NFS mounted filesystem). contained_in_local_fs() returns false in this case. This is intentional but breaks clients that have an NFS root filesystem. In this case we shouldn't impose this restriction. --- CHANGELOG | 1 + lib/mounts.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f7aa839..2553f26 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ - check for map key in (possible) alternate map sources when doing lookup. - eliminate redundant DNS name lookups. - additional fix incorrect pthreads condition handling for mount requests. +- allow mount point directory creation for clients with an NFS root. 14/01/2008 autofs-5.0.3 ----------------------- diff --git a/lib/mounts.c b/lib/mounts.c index 425a65a..b987fbb 100644 --- a/lib/mounts.c +++ b/lib/mounts.c @@ -363,7 +363,13 @@ int contained_in_local_fs(const char *path) if (!strncmp(path, this->path, len)) { if (len > 1 && pathlen > len && path[len] != '/') continue; - else if (this->fs_name[0] == '/') { + else if (len == 1 && this->path[0] == '/') { + /* + * always return true on rootfs, we don't + * want to break diskless clients. + */ + ret = 1; + } else if (this->fs_name[0] == '/') { if (strlen(this->fs_name) > 1) { if (this->fs_name[1] != '/') ret = 1;