summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-13 10:54:50 +1000
committerAndrew Tridgell <tridge@samba.org>2011-07-13 12:51:05 +0200
commiteb7c2af83bbebd9e32fdfd459cfef7db15918911 (patch)
treefd02588635c6ba95f24b6f9e210d280a5e11307e /source4/scripting/python
parent1ee67df307f27f2787793b7304a333a563f247c3 (diff)
downloadsamba-eb7c2af83bbebd9e32fdfd459cfef7db15918911.tar.gz
samba-eb7c2af83bbebd9e32fdfd459cfef7db15918911.tar.bz2
samba-eb7c2af83bbebd9e32fdfd459cfef7db15918911.zip
dbcheck: only do the provision dbcheck if there are objects to check
when in FILL_DRS mode, there are no objects to check yet Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/provision/__init__.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 66dcf6a40b..97cf7bff17 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1837,19 +1837,20 @@ def provision(logger, session_info, credentials, smbconf=None,
logger.info("Failed to chown %s to bind gid %u",
dns_keytab_path, paths.bind_gid)
- # fix any dangling GUIDs from the provision
- logger.info("Fixing provision GUIDs")
- chk = dbcheck(samdb, samdb_schema=samdb, verbose=False, fix=True, yes=True, quiet=True)
- samdb.transaction_start()
- chk.check_database(DN=None, controls=["search_options:1:2", "show_deleted:1"],
- attrs=['defaultObjectCategory',
- 'objectCategory',
- 'ipsecOwnersReference',
- 'ipsecFilterReference',
- 'ipsecISAKMPReference',
- 'ipsecNegotiationPolicyReference',
- 'ipsecNFAReference'])
- samdb.transaction_commit()
+ if samdb_fill != FILL_DRS:
+ # fix any dangling GUIDs from the provision
+ logger.info("Fixing provision GUIDs")
+ chk = dbcheck(samdb, samdb_schema=samdb, verbose=False, fix=True, yes=True, quiet=True)
+ samdb.transaction_start()
+ chk.check_database(DN=None, controls=["search_options:1:2", "show_deleted:1"],
+ attrs=['defaultObjectCategory',
+ 'objectCategory',
+ 'ipsecOwnersReference',
+ 'ipsecFilterReference',
+ 'ipsecISAKMPReference',
+ 'ipsecNegotiationPolicyReference',
+ 'ipsecNFAReference'])
+ samdb.transaction_commit()
logger.info("Please install the phpLDAPadmin configuration located at %s into /etc/phpldapadmin/config.php",