forked from Lainports/freebsd-ports
This is an initial attempt to add Samba to the FreeBSD after major
rewrite of the VFS code in the upstream.
Most of the port development is now carried in:
https://gitlab.com/samba-freebsd
Due to the way how new Samba VFS code is written there is a constrain
that Samba 4.14+ can run only on FreeBSD 13.1+, as it requires support
of the `nodup` option for the `fdesc` file system, as well as it's
presence in the system in general.
https://gitlab.com/samba-freebsd/-/wikis/The-New-VFS
I'd like to thank CyberSecure Pty Ltd. company for their supoort of
the port development and Andrew Walker from iXsystems Inc. for the
patches he created and made available for the Samba4 on TrueNAS.
PR: 263874
35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
From 02b599cc740490fa6f433b0c455fe458fdc1db61 Mon Sep 17 00:00:00 2001
|
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
|
Date: Mon, 31 May 2021 02:45:11 +0200
|
|
Subject: [PATCH 20/28] FreeBSD 12 between r336017 and r342928 wrongfuly return
|
|
ENOENT for the not enabled qoutas on ZFS. Wrap relevant error code check with
|
|
the versioning ifdef's.
|
|
|
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
|
---
|
|
source3/lib/sysquotas_4B.c | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/source3/lib/sysquotas_4B.c b/source3/lib/sysquotas_4B.c
|
|
index d9beb924ad9..c41cac02e5f 100644
|
|
--- a/source3/lib/sysquotas_4B.c
|
|
+++ b/source3/lib/sysquotas_4B.c
|
|
@@ -140,7 +140,14 @@ static int sys_quotactl_4B(const char * path, int cmd,
|
|
/* ENOTSUP means quota support is not compiled in. EINVAL
|
|
* means that quotas are not configured (commonly).
|
|
*/
|
|
- if (errno != ENOTSUP && errno != EINVAL) {
|
|
+ if (errno != ENOTSUP && errno != EINVAL
|
|
+/*
|
|
+ * FreeBSD 12 between r336017 and r342928 wrongfuly return ENOENT for the not enabled qoutas on ZFS.
|
|
+ */
|
|
+#if defined(__FreeBSD__) && ((__FreeBSD_version >= 1102503 && __FreeBSD_version <= 1102506) || (__FreeBSD_version >= 1200072 && __FreeBSD_version <= 1200503) || (__FreeBSD_version >= 1300000 && __FreeBSD_version <= 1300009))
|
|
+ && errno != ENOENT
|
|
+#endif
|
|
+ ) {
|
|
DEBUG(5, ("failed to %s quota for %s ID %u on %s: %s\n",
|
|
(cmd & QCMD(Q_GETQUOTA, 0)) ? "get" : "set",
|
|
(cmd & QCMD(0, GRPQUOTA)) ? "group" : "user",
|
|
--
|
|
2.37.1
|
|
|