]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4/scripting/bin: PY3 make sure GUID result of format is string
authorNoel Power <noel.power@suse.com>
Tue, 2 Oct 2018 13:45:53 +0000 (14:45 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Oct 2018 03:50:27 +0000 (05:50 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_dnsupdate
source4/scripting/bin/samba_spnupdate

index ccf44c5995d2b70e30db70b9ed6dcf9261e7dece..ae355e9ec4e904b394baea7ff3ab5eb58dcc2301 100755 (executable)
@@ -49,6 +49,7 @@ from samba.dcerpc import netlogon, winbind
 from samba.netcmd.dns import cmd_dns
 from samba import gensec
 from samba.kcc import kcc_utils
+from samba.compat import get_string
 import ldb
 
 samba.ensure_third_party_module("dns", "dnspython")
@@ -375,7 +376,7 @@ def get_subst_vars(samdb):
     vars['SITE']      = samdb.server_site_name()
     res = samdb.search(base=samdb.get_default_basedn(), scope=SCOPE_BASE, attrs=["objectGUID"])
     guid = samdb.schema_format_value("objectGUID", res[0]['objectGUID'][0])
-    vars['DOMAINGUID'] = guid
+    vars['DOMAINGUID'] = get_string(guid)
 
     vars['IF_DC'] = ""
     vars['IF_RWDC'] = "# "
index 888b37f4c34c352d58a1207ac87de94f3bcef1c1..69de3819751da8fc2ec87318ecf6bc3ed5cdb72a 100755 (executable)
@@ -41,6 +41,7 @@ from samba import getopt as options
 from samba.auth import system_session
 from samba.samdb import SamDB
 from samba.credentials import Credentials, DONT_USE_KERBEROS
+from samba.compat import get_string
 
 parser = optparse.OptionParser("samba_spnupdate")
 sambaopts = options.SambaOptions(parser)
@@ -79,7 +80,7 @@ def get_subst_vars(samdb):
     vars['NTDSGUID']  = samdb.get_ntds_GUID()
     res = samdb.search(base=samdb.get_default_basedn(), scope=ldb.SCOPE_BASE, attrs=["objectGUID"])
     guid = samdb.schema_format_value("objectGUID", res[0]['objectGUID'][0])
-    vars['DOMAINGUID'] = guid
+    vars['DOMAINGUID'] = get_string(guid)
     return vars
 
 try: