mirror of
https://github.com/samba-team/samba.git
synced 2025-07-14 12:59:07 +03:00
Fix templates.ldb reprovision handling.
This sets the attributes in a seperate transaction, and allows a
forced delete of the whole file.
Andrew Bartlett
(This used to be commit 423db2468b
)
This commit is contained in:
@ -617,7 +617,17 @@ def setup_templatesdb(path, setup_path, session_info, credentials, lp):
|
||||
"""
|
||||
templates_ldb = SamDB(path, session_info=session_info,
|
||||
credentials=credentials, lp=lp)
|
||||
templates_ldb.erase()
|
||||
# Wipes the database
|
||||
try:
|
||||
templates_ldb.erase()
|
||||
except:
|
||||
os.unlink(path)
|
||||
|
||||
templates_ldb.load_ldif_file_add(setup_path("provision_templates_init.ldif"))
|
||||
|
||||
templates_ldb = SamDB(path, session_info=session_info,
|
||||
credentials=credentials, lp=lp)
|
||||
|
||||
templates_ldb.load_ldif_file_add(setup_path("provision_templates.ldif"))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user