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