1
0
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:
Jo Sutton 2024-08-01 15:47:13 +12:00 committed by Douglas Bagnall
parent bf8a22b2e4
commit b6c25ed271

View File

@ -874,9 +874,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
setup_add_ldif(dom_ldb,
setup_path("provision_basedn_options.ldif"), None)
except:
except Exception as err:
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
# 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
os.link(os.path.join(private_dir, forestzone_file + "-lock"),
os.path.join(dns_dir, forestzone_file + "-lock"))
except OSError:
except OSError as err:
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
del partfile[domainzonedn]
if forestzone_file:
@ -935,9 +935,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
else:
tdb_copy(os.path.join(private_dir, pfile),
os.path.join(dns_dir, pfile))
except:
except Exception as err:
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
# Give bind read/write permissions dns partitions