autofs-5.0.3 - allow directory create on NFS root
From: Matthias Koenig <mkoenig@suse.de>
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.
---
lib/mounts.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- autofs-5.0.2.orig/lib/mounts.c
+++ autofs-5.0.2/lib/mounts.c
@@ -363,7 +363,13 @@ int contained_in_local_fs(const char *pa
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;