summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-14 14:35:13 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-14 17:17:29 +0200
commit4e5e302a102cfa059c2126d12f445d356f3d5ef0 (patch)
tree093a51569695824a1fab4cfbef66686165090d77 /source4/scripting/python
parenta74ca56c482257f79eb6f966fc490657a0d6407b (diff)
downloadsamba-4e5e302a102cfa059c2126d12f445d356f3d5ef0.tar.gz
samba-4e5e302a102cfa059c2126d12f445d356f3d5ef0.tar.bz2
samba-4e5e302a102cfa059c2126d12f445d356f3d5ef0.zip
s4:samba-tool/drs: print the dns name of the server belonging to a connection
Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/drs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/drs.py b/source4/scripting/python/samba/netcmd/drs.py
index 7f8dc09175..e14f72f94c 100644
--- a/source4/scripting/python/samba/netcmd/drs.py
+++ b/source4/scripting/python/samba/netcmd/drs.py
@@ -170,10 +170,13 @@ class cmd_drs_showrepl(Command):
self.message("==== KCC CONNECTION OBJECTS ====\n")
for c in conn:
+ c_rdn, sep, c_server_dn = c['fromServer'][0].partition(',')
+ c_server_res = self.samdb.search(base=c_server_dn, scope=ldb.SCOPE_BASE, attrs=["dnsHostName"])
+ c_server_dns = c_server_res[0]["dnsHostName"][0]
self.message("Connection --")
self.message("\tConnection name: %s" % c['name'][0])
self.message("\tEnabled : %s" % attr_default(c, 'enabledConnection', 'TRUE'))
- self.message("\tServer DNS name : %s" % server_dns)
+ self.message("\tServer DNS name : %s" % c_server_dns)
self.message("\tServer DN name : %s" % c['fromServer'][0])
self.message("\t\tTransportType: RPC")
self.message("\t\toptions: 0x%08X" % int(attr_default(c, 'options', 0)))