mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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>
This commit is contained in:
parent
1ee67df307
commit
eb7c2af83b
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user