diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-27 22:44:55 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-27 23:35:13 +0100 |
commit | b87c3703cf890bd55340a201536073bd2be1e1d8 (patch) | |
tree | 293956a5824d0f4b6b34360b5f9b51d7099bd8b6 | |
parent | 989d8803f28826e6541667127abad801c4fa4566 (diff) | |
download | samba-b87c3703cf890bd55340a201536073bd2be1e1d8.tar.gz samba-b87c3703cf890bd55340a201536073bd2be1e1d8.tar.bz2 samba-b87c3703cf890bd55340a201536073bd2be1e1d8.zip |
s4:netcmd/drs.py - use "objectClass" for discovering the server and it's NTDS settings object
Small optimisation: we don't need to look for "nTDSDSARO" since it's a subclass
of "ntDSDSA".
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov 27 23:35:13 CET 2010 on sn-devel-104
-rw-r--r-- | source4/scripting/python/samba/netcmd/drs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/drs.py b/source4/scripting/python/samba/netcmd/drs.py index 7c4b1713b1..e7a631b6a7 100644 --- a/source4/scripting/python/samba/netcmd/drs.py +++ b/source4/scripting/python/samba/netcmd/drs.py @@ -258,7 +258,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="(&(objectCategory=server)(|(name=%s)(dNSHostName=%s)))" % (SOURCE_DC, + expression="(&(objectClass=server)(|(name=%s)(dNSHostName=%s)))" % (SOURCE_DC, SOURCE_DC), attrs=[]) if len(msg) == 0: @@ -266,7 +266,7 @@ class cmd_drs_replicate(Command): server_dn = msg[0]['dn'] msg = self.samdb.search(base=server_dn, scope=ldb.SCOPE_ONELEVEL, - expression="(|(objectCategory=nTDSDSA)(objectCategory=nTDSDSARO))", + expression="(objectClass=nTDSDSA)", attrs=['objectGUID', 'options']) if len(msg) == 0: raise CommandError("Failed to find source NTDS DN %s" % SOURCE_DC) |