[SCM] Samba Shared Repository - branch master updated -
7a5b6a2ea194677c59ad6fab0aca3f102b5b2f46
Andrew Bartlett
abartlet at samba.org
Thu Dec 18 06:19:52 GMT 2008
The branch, master has been updated
via 7a5b6a2ea194677c59ad6fab0aca3f102b5b2f46 (commit)
from 1a399db01c90753f0f1c70b2987b925c828b1c53 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7a5b6a2ea194677c59ad6fab0aca3f102b5b2f46
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Dec 18 17:17:56 2008 +1100
Handle different failure modes when we wipe the db in provision
We didn't handle the mode where we can't load the main sam.ldb due to
the modules being 'wrong', and when we did remove the file, we didn't
wipe the partitions.
-----------------------------------------------------------------------
Summary of changes:
source4/scripting/python/samba/provision.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 5da073c..95bff74 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -432,17 +432,18 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info,
"""
assert session_info is not None
- samdb = SamDB(samdb_path, session_info=session_info,
- credentials=credentials, lp=lp)
-
- # Wipes the database
try:
+ samdb = SamDB(samdb_path, session_info=session_info,
+ credentials=credentials, lp=lp)
+ # Wipes the database
samdb.erase()
except:
os.unlink(samdb_path)
-
- samdb = SamDB(samdb_path, session_info=session_info,
- credentials=credentials, lp=lp)
+ samdb = SamDB(samdb_path, session_info=session_info,
+ credentials=credentials, lp=lp)
+ # Wipes the database
+ samdb.erase()
+
#Add modules to the list to activate them by default
#beware often order is important
--
Samba Shared Repository
More information about the samba-cvs
mailing list