Domain controller role in until now has failure mode where errors in setting the sysvol ACL can leave the ldb with errors resulting in undefined Samba behavior. These errors aren't properly reported in the FreeNAS UI. Since the current implementation of the DC role uses a sentinel file to indicate that the domain has been provisioned (which doesn't get set during the aforementioned partial provisioning failure), subsequent service restarts of the DC role. Implement following improvements:
- Move provisioning to middleware plugin and raise exception in case of failure to provision.
- Set ZFS User Property to indicate that the domain has been provisioned successfully (this is less likely to be accidentally removed by users).