Bug 250643

Summary: net/samba413 - provisioning not working in ZFS jail "NT_STATUS_INVALID_PARAMETER"
Product: Ports & Packages Reporter: johannes.kunde
Component: Individual Port(s)Assignee: Timur I. Bakeyev <timur>
Status: Closed FIXED    
Severity: Affects Many People CC: vvd
Priority: --- Flags: bugzilla: maintainer-feedback? (timur)
Version: Latest   
Hardware: amd64   
OS: Any   

Description johannes.kunde 2020-10-26 18:23:26 UTC
Provisioning a DC in an iocage jail using ZFS does not work with samba413 (same error message as in bug 246372 and 239105). I tryed to add --option="vfs objects"="dfs_samba4 zfsacl" as well as --option="vfs objects"="freebsd" with no luck. Older versions of samba throw the same error.

Command used:
samba-tool domain provision \
	--domain=r001 \
	--host-ip= \
	--use-rfc2307 \
	--realm=r001.test.net \
	--server-role=dc \
	--dns-backend=BIND9_DLZ \

vfs objects specified without required AD DC module: dfs_samba4
vfs objects specified without required AD DC module: dfs_samba4
set_nt_acl_no_snum: fset_nt_acl returned NT_STATUS_INVALID_PARAMETER.
ERROR(runtime): uncaught exception - (3221225485, 'An invalid parameter was passed to a service or function.')
  File "/usr/local/lib/python3.7/site-packages/samba/netcmd/__init__.py", line 186, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/samba/netcmd/domain.py", line 505, in run
  File "/usr/local/lib/python3.7/site-packages/samba/provision/__init__.py", line 2366, in provision
  File "/usr/local/lib/python3.7/site-packages/samba/provision/__init__.py", line 1990, in provision_fill
    names.domaindn, lp, use_ntvfs)
  File "/usr/local/lib/python3.7/site-packages/samba/provision/__init__.py", line 1765, in setsysvolacl
  File "/usr/local/lib/python3.7/site-packages/samba/provision/__init__.py", line 1762, in _setntacl
  File "/usr/local/lib/python3.7/site-packages/samba/ntacls.py", line 238, in setntacl
    service=service, session_info=session_info)
Comment 1 johannes.kunde 2020-10-28 16:20:36 UTC
I found the solution to my problem. I had to add "dfs_samba4 zfsacl acl_xattr" (probably a subset also suffice) to `/usr/local/etc/smb4.conf`. The settings in this file obviously oversteer the command line arguments, which is kind of misleading. I don't know if this is the intended behavior?