mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s4/scripting/bin: PY3 make sure GUID result of format is string
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
f94a813796
commit
1a4e95da2b
@ -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'] = "# "
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user