1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

Revert "s4:netcmd/drs.py - use "objectClass" for discovering the server and it's NTDS settings object"

This reverts commit b87c3703cf890bd55340a201536073bd2be1e1d8.
Andrew Bartlett told me that exactly the opposite is true - the "objectCategory"
lookup is performing better.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov 28 14:18:41 CET 2010 on sn-devel-104
This commit is contained in:
Matthias Dieter Wallnöfer 2010-11-28 12:54:02 +01:00
parent b028a6001a
commit ce55d7c9f0

View File

@ -260,7 +260,7 @@ class cmd_drs_replicate(Command):
# we need to find the NTDS GUID of the source DC
msg = self.samdb.search(base=self.samdb.get_config_basedn(),
expression="(&(objectClass=server)(|(name=%s)(dNSHostName=%s)))" % (SOURCE_DC,
expression="(&(objectCategory=server)(|(name=%s)(dNSHostName=%s)))" % (SOURCE_DC,
SOURCE_DC),
attrs=[])
if len(msg) == 0:
@ -268,7 +268,7 @@ class cmd_drs_replicate(Command):
server_dn = msg[0]['dn']
msg = self.samdb.search(base=server_dn, scope=ldb.SCOPE_ONELEVEL,
expression="(objectClass=nTDSDSA)",
expression="(|(objectCategory=nTDSDSA)(objectCategory=nTDSDSARO))",
attrs=['objectGUID', 'options'])
if len(msg) == 0:
raise CommandError("Failed to find source NTDS DN %s" % SOURCE_DC)