aboutsummaryrefslogtreecommitdiffstats
path: root/net/samba422/files/patch-source3_param_loadparm.c
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
committerLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
commit2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch)
tree25f0138e1af8902b92dacc8cce09b267447c17db /net/samba422/files/patch-source3_param_loadparm.c
parentf85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff)
parent1a30da80670973368b399f2b01fe9c04b91a1273 (diff)
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'net/samba422/files/patch-source3_param_loadparm.c')
-rw-r--r--net/samba422/files/patch-source3_param_loadparm.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/samba422/files/patch-source3_param_loadparm.c b/net/samba422/files/patch-source3_param_loadparm.c
new file mode 100644
index 000000000000..9d74f59bfd2a
--- /dev/null
+++ b/net/samba422/files/patch-source3_param_loadparm.c
@@ -0,0 +1,32 @@
+--- source3/param/loadparm.c.orig 2025-02-06 10:31:54 UTC
++++ source3/param/loadparm.c
+@@ -2890,9 +2890,29 @@ static void init_locals(void)
+ } else {
+ if (lp_parm_const_string(-1, "xattr_tdb", "file", NULL)) {
+ lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr xattr_tdb");
++ /*
++ * By default, the samba sysvol is located in the statedir. Provisioning will fail in setntacl
++ * unless we have zfacl enabled. Unfortunately, at this point the smb.conf has not been generated.
++ * This workaround is freebsd-specific.
++ */
++#if defined(_PC_ACL_EXTENDED)
++ } else if (pathconf(lp_state_directory(), _PC_ACL_EXTENDED) == 1) {
++ lp_do_parameter(-1, "vfs objects", "dfs_samba4 freebsd");
++#endif
++#if defined(_PC_ACL_NFS4)
++ } else if (pathconf(lp_state_directory(), _PC_ACL_NFS4) == 1) {
++ lp_do_parameter(-1, "vfs objects", "dfs_samba4 zfsacl");
++#endif
+ } else if (lp_parm_const_string(-1, "posix", "eadb", NULL)) {
+ lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr posix_eadb");
+ } else {
++ /*
++ * This should only set dfs_samba4 and leave acl_xattr
++ * to be set later (or zfsacl). The only reason the decision
++ * can't be made here to load acl_xattr or zfsacl is
++ * that we don't have access to what the target
++ * directory is.
++ */
+ lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr");
+ }
+ }