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