1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

join: Avoid duplicating "Default-First-Site-Name" string

The provision code already defines "Default-First-Site-Name" so we might
as well reuse it.

The join.py already uses a suitable default, so assigning the default in
the domain netcmd code is unnecessary.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Tim Beale 2018-09-19 10:21:12 +12:00 committed by Andrew Bartlett
parent 89543af0e8
commit 9e81d43ac3
2 changed files with 3 additions and 5 deletions

View File

@ -30,7 +30,8 @@ from samba.ndr import ndr_pack, ndr_unpack
from samba.dcerpc import security, drsuapi, misc, nbt, lsa, drsblobs, dnsserver, dnsp
from samba.dsdb import DS_DOMAIN_FUNCTION_2003
from samba.credentials import Credentials, DONT_USE_KERBEROS
from samba.provision import secretsdb_self_join, provision, provision_fill, FILL_DRS, FILL_SUBDOMAIN
from samba.provision import (secretsdb_self_join, provision, provision_fill,
FILL_DRS, FILL_SUBDOMAIN, DEFAULTSITE)
from samba.provision.common import setup_path
from samba.schema import Schema
from samba import descriptor
@ -68,7 +69,7 @@ class DCJoinContext(object):
promote_existing=False, plaintext_secrets=False,
backend_store=None, forced_local_samdb=None):
if site is None:
site = "Default-First-Site-Name"
site = DEFAULTSITE
ctx.logger = logger
ctx.creds = creds

View File

@ -688,9 +688,6 @@ class cmd_domain_join(Command):
creds = credopts.get_credentials(lp)
net = Net(creds, lp, server=credopts.ipaddress)
if site is None:
site = "Default-First-Site-Name"
logger = self.get_logger()
if verbose:
logger.setLevel(logging.DEBUG)