Blame SOURCES/coreutils-8.22-df-autofs.patch

dd59ef
From ed936e1909a314febfdb9574bd10cc2d46d2b3e3 Mon Sep 17 00:00:00 2001
dd59ef
From: Kamil Dudka <kdudka@redhat.com>
dd59ef
Date: Fri, 19 Feb 2016 10:41:49 +0100
dd59ef
Subject: [PATCH] mountlist: recognize autofs-mounted remote file systems, too
dd59ef
dd59ef
Originally reported at: https://bugzilla.redhat.com/1309247
dd59ef
* lib/mountlist.c (ME_REMOTE): Return true if a file system is named
dd59ef
"-hosts" because it is used by autofs to mount remote file systems.
dd59ef
dd59ef
Upstream-commit: 781788eeb5d4d0b816698e8629300cd90a7379bd
dd59ef
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
dd59ef
---
dd59ef
 lib/mountlist.c | 6 ++++--
dd59ef
 1 file changed, 4 insertions(+), 2 deletions(-)
dd59ef
dd59ef
diff --git a/lib/mountlist.c b/lib/mountlist.c
dd59ef
index b839cd1..17779f6 100644
dd59ef
--- a/lib/mountlist.c
dd59ef
+++ b/lib/mountlist.c
dd59ef
@@ -212,13 +212,15 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
dd59ef
 
dd59ef
 #ifndef ME_REMOTE
dd59ef
 /* A file system is "remote" if its Fs_name contains a ':'
dd59ef
-   or if (it is of type (smbfs or cifs) and its Fs_name starts with '//').  */
dd59ef
+   or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
dd59ef
+   or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).  */
dd59ef
 # define ME_REMOTE(Fs_name, Fs_type)            \
dd59ef
     (strchr (Fs_name, ':') != NULL              \
dd59ef
      || ((Fs_name)[0] == '/'                    \
dd59ef
          && (Fs_name)[1] == '/'                 \
dd59ef
          && (strcmp (Fs_type, "smbfs") == 0     \
dd59ef
-             || strcmp (Fs_type, "cifs") == 0)))
dd59ef
+             || strcmp (Fs_type, "cifs") == 0)) \
dd59ef
+     || (strcmp("-hosts", Fs_name) == 0))
dd59ef
 #endif
dd59ef
 
dd59ef
 #if MOUNTED_GETMNTINFO
dd59ef
-- 
dd59ef
2.5.0
dd59ef