|
|
7714f9 |
From 2cd5219da87274db251a7f836efe6ac724b70e53 Mon Sep 17 00:00:00 2001
|
|
|
7714f9 |
From: Karel Zak <kzak@redhat.com>
|
|
|
7714f9 |
Date: Wed, 11 Mar 2020 10:38:37 +0100
|
|
|
7714f9 |
Subject: [PATCH 40/40] libmount: improve smb{2,3} support
|
|
|
7714f9 |
|
|
|
7714f9 |
It seems kernel can use smb3 as fstype in mountinfo.
|
|
|
7714f9 |
|
|
|
7714f9 |
Upstream: http://github.com/karelzak/util-linux/commit/36d80cb6c11b3064ed9fb29c7c8b101e3f266441
|
|
|
7714f9 |
Upstream: http://github.com/karelzak/util-linux/commit/b7ff4134beea53688ab3c01484cf59b2ce2d9ce9
|
|
|
7714f9 |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1812118
|
|
|
7714f9 |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
7714f9 |
---
|
|
|
7714f9 |
libmount/src/tab.c | 5 ++++-
|
|
|
7714f9 |
libmount/src/utils.c | 1 +
|
|
|
7714f9 |
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
7714f9 |
|
|
|
7714f9 |
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
|
|
|
7714f9 |
index eb61dd33e..74d60df3d 100644
|
|
|
7714f9 |
--- a/libmount/src/tab.c
|
|
|
7714f9 |
+++ b/libmount/src/tab.c
|
|
|
7714f9 |
@@ -1644,9 +1644,12 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
|
|
7714f9 |
if (root) {
|
|
|
7714f9 |
const char *fstype = mnt_fs_get_fstype(fs);
|
|
|
7714f9 |
|
|
|
7714f9 |
- if (fstype && strcmp(fstype, "cifs") == 0) {
|
|
|
7714f9 |
+ if (fstype && (strcmp(fstype, "cifs") == 0
|
|
|
7714f9 |
+ || strcmp(fstype, "smb3") == 0)) {
|
|
|
7714f9 |
+
|
|
|
7714f9 |
const char *unc_subdir = get_cifs_unc_subdir_path(src);
|
|
|
7714f9 |
const char *path_on_fs = mnt_fs_get_root(fs);
|
|
|
7714f9 |
+
|
|
|
7714f9 |
if (!unc_subdir || !path_on_fs || !streq_paths(unc_subdir, path_on_fs))
|
|
|
7714f9 |
continue;
|
|
|
7714f9 |
} else {
|
|
|
7714f9 |
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
|
|
|
7714f9 |
index 04e79f53f..e43588831 100644
|
|
|
7714f9 |
--- a/libmount/src/utils.c
|
|
|
7714f9 |
+++ b/libmount/src/utils.c
|
|
|
7714f9 |
@@ -315,6 +315,7 @@ int mnt_fstype_is_pseudofs(const char *type)
|
|
|
7714f9 |
int mnt_fstype_is_netfs(const char *type)
|
|
|
7714f9 |
{
|
|
|
7714f9 |
if (strcmp(type, "cifs") == 0 ||
|
|
|
7714f9 |
+ strcmp(type, "smb3") == 0 ||
|
|
|
7714f9 |
strcmp(type, "smbfs") == 0 ||
|
|
|
7714f9 |
strncmp(type,"nfs", 3) == 0 ||
|
|
|
7714f9 |
strcmp(type, "afs") == 0 ||
|
|
|
7714f9 |
--
|
|
|
7714f9 |
2.25.4
|
|
|
7714f9 |
|