mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
python:provision: Do not suppress errors produced setting up BIND database
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
bf8a22b2e4
commit
b6c25ed271
@ -874,9 +874,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
|
|||||||
setup_add_ldif(dom_ldb,
|
setup_add_ldif(dom_ldb,
|
||||||
setup_path("provision_basedn_options.ldif"), None)
|
setup_path("provision_basedn_options.ldif"), None)
|
||||||
|
|
||||||
except:
|
except Exception as err:
|
||||||
logger.error(
|
logger.error(
|
||||||
"Failed to setup database for BIND, AD based DNS cannot be used")
|
f"Failed to setup database for BIND, AD based DNS cannot be used: {err}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# This line is critical to the security of the whole scheme.
|
# This line is critical to the security of the whole scheme.
|
||||||
@ -914,9 +914,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
|
|||||||
# lock file as well
|
# lock file as well
|
||||||
os.link(os.path.join(private_dir, forestzone_file + "-lock"),
|
os.link(os.path.join(private_dir, forestzone_file + "-lock"),
|
||||||
os.path.join(dns_dir, forestzone_file + "-lock"))
|
os.path.join(dns_dir, forestzone_file + "-lock"))
|
||||||
except OSError:
|
except OSError as err:
|
||||||
logger.error(
|
logger.error(
|
||||||
"Failed to setup database for BIND, AD based DNS cannot be used")
|
f"Failed to setup database for BIND, AD based DNS cannot be used: {err}")
|
||||||
raise
|
raise
|
||||||
del partfile[domainzonedn]
|
del partfile[domainzonedn]
|
||||||
if forestzone_file:
|
if forestzone_file:
|
||||||
@ -935,9 +935,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
|
|||||||
else:
|
else:
|
||||||
tdb_copy(os.path.join(private_dir, pfile),
|
tdb_copy(os.path.join(private_dir, pfile),
|
||||||
os.path.join(dns_dir, pfile))
|
os.path.join(dns_dir, pfile))
|
||||||
except:
|
except Exception as err:
|
||||||
logger.error(
|
logger.error(
|
||||||
"Failed to setup database for BIND, AD based DNS cannot be used")
|
f"Failed to setup database for BIND, AD based DNS cannot be used: {err}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# Give bind read/write permissions dns partitions
|
# Give bind read/write permissions dns partitions
|
||||||
|
Loading…
Reference in New Issue
Block a user