diff options
Diffstat (limited to 'source4/scripting/python/samba/netcmd/domain.py')
-rw-r--r-- | source4/scripting/python/samba/netcmd/domain.py | 5 |
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""" |