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

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