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