summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-09-12 20:57:10 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-09-13 14:53:24 +0200
commit4e87a8419ca662d35018f0d00c80f3d816473cbc (patch)
treebe435e4591c7e612484928b2a1f4a00c87109cf8 /source4/scripting
parent924b2d5b7fdfc562765ffe7181ffb479bb05ae84 (diff)
downloadsamba-4e87a8419ca662d35018f0d00c80f3d816473cbc.tar.gz
samba-4e87a8419ca662d35018f0d00c80f3d816473cbc.tar.bz2
samba-4e87a8419ca662d35018f0d00c80f3d816473cbc.zip
s4:upgrade_from_s3 - restore "get_testparm_var" method
This has accidentally been removed by commit 8268c2d4e231b05b439bc70331b75342b35daa4e. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 9490001404..4211b06802 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -54,7 +54,10 @@ from samba.dsdb import (
DS_DOMAIN_FUNCTION_2008_R2,
)
-
+def get_testparm_var(testparm, varname):
+ cmd = "%s -s -l --parameter-name='%s' 2>/dev/null" % (testparm, varname)
+ output = os.popen(cmd, 'r').readline()
+ return output.strip()
class cmd_domain_export_keytab(Command):
"""Dumps kerberos keys of the domain into a keytab"""