From a5d838063cccb80f5a23a3c93e1c6ad7c24a08d8 Mon Sep 17 00:00:00 2001 From: Shane Nehring Date: Thu, 5 Feb 2026 10:07:17 +0100 Subject: [PATCH] smbd: Fix ZFS on Linux snapshot mount Bug: https://bugzilla.samba.org/show_bug.cgi?id=15991 Signed-off-by: Shane Nehring --- source3/smbd/open.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8a52cbd6850..123d89bf18c 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -46,6 +46,7 @@ #if defined(HAVE_LINUX_MAGIC_H) #include +#define ZFS_SUPER_MAGIC 0x2fc12fc1 #endif static NTSTATUS inherit_new_acl(files_struct *dirfsp, files_struct *fsp); @@ -887,7 +888,9 @@ static bool fsp_is_automount_mountpoint(struct files_struct *fsp, int old_fd) DBG_ERR("fstatfs failed: %s\n", strerror(errno)); return false; } - if (sbuf.f_type == AUTOFS_SUPER_MAGIC) { + if ((sbuf.f_type == AUTOFS_SUPER_MAGIC) || + (sbuf.f_type == ZFS_SUPER_MAGIC)) + { return true; } return false; -- 2.51.0