summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-06-21 18:17:55 +0200
committerMartin Basti <mbasti@redhat.com>2016-06-27 13:35:00 +0200
commit218734ba5ac3326daaf1097ef98217f6c86f526c (patch)
tree3fe8c47ea112f21e6ff2ba8e7f07cebf2e2a2880
parente42f662b78d9a9d9c0ca786e69d7c203e6863462 (diff)
downloadfreeipa-218734ba5ac3326daaf1097ef98217f6c86f526c.tar.gz
freeipa-218734ba5ac3326daaf1097ef98217f6c86f526c.tar.xz
freeipa-218734ba5ac3326daaf1097ef98217f6c86f526c.zip
DNS Locations: hide option --no-msdcs in adtrust-install
Since DNS location mechanism is active, this option has no effect, because records are generate dynamically. https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com>
-rwxr-xr-xinstall/tools/ipa-adtrust-install10
-rw-r--r--ipaserver/install/adtrustinstance.py21
2 files changed, 15 insertions, 16 deletions
diff --git a/install/tools/ipa-adtrust-install b/install/tools/ipa-adtrust-install
index 5babcdb7c..5ba72a65d 100755
--- a/install/tools/ipa-adtrust-install
+++ b/install/tools/ipa-adtrust-install
@@ -29,6 +29,8 @@ import ldap
import six
+from optparse import SUPPRESS_HELP
+
from ipaserver.install import adtrustinstance
from ipaserver.install.installutils import (
read_password,
@@ -54,9 +56,11 @@ def parse_options():
default=False, help="print debugging information")
parser.add_option("--netbios-name", dest="netbios_name",
help="NetBIOS name of the IPA domain")
+
+ # no-msdcs has not effect, option is here just for backward compatibility
parser.add_option("--no-msdcs", dest="no_msdcs", action="store_true",
- default=False, help="Do not create DNS service records " \
- "for Windows in managed DNS server")
+ default=False, help=SUPPRESS_HELP)
+
parser.add_option("--rid-base", dest="rid_base", type=int, default=1000,
help="Start value for mapping UIDs and GIDs to RIDs")
parser.add_option("--secondary-rid-base", dest="secondary_rid_base",
@@ -390,7 +394,7 @@ def main():
smb.setup(api.env.host, api.env.realm,
netbios_name, reset_netbios_name,
options.rid_base, options.secondary_rid_base,
- options.no_msdcs, options.add_sids,
+ options.add_sids,
enable_compat = options.enable_compat)
smb.find_local_id_range()
smb.create_instance()
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index 6ab15df27..0114a33a0 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -124,7 +124,6 @@ class ADTRUSTInstance(service.Service):
def __init__(self, fstore=None):
self.netbios_name = None
self.reset_netbios_name = None
- self.no_msdcs = None
self.add_sids = None
self.smbd_user = None
self.smb_dn_pwd = None
@@ -585,17 +584,14 @@ class ADTRUSTInstance(service.Service):
err_msg = None
- if self.no_msdcs:
- err_msg = '--no-msdcs was given, special DNS service records ' \
- 'are not added to local DNS server'
+ ret = api.Command['dns_is_enabled']()
+ if not ret['result']:
+ err_msg = "DNS management was not enabled at install time."
else:
- ret = api.Command['dns_is_enabled']()
- if not ret['result']:
- err_msg = "DNS management was not enabled at install time."
- else:
- if not dns_zone_exists(zone):
- err_msg = "DNS zone %s cannot be managed " \
- "as it is not defined in IPA" % zone
+ if not dns_zone_exists(zone):
+ err_msg = (
+ "DNS zone %s cannot be managed as it is not defined in "
+ "IPA" % zone)
if err_msg:
self.print_msg(err_msg)
@@ -766,7 +762,7 @@ class ADTRUSTInstance(service.Service):
def setup(self, fqdn, realm_name, netbios_name,
reset_netbios_name, rid_base, secondary_rid_base,
- no_msdcs=False, add_sids=False, smbd_user="samba",
+ add_sids=False, smbd_user="samba",
enable_compat=False):
self.fqdn = fqdn
self.realm = realm_name
@@ -774,7 +770,6 @@ class ADTRUSTInstance(service.Service):
self.reset_netbios_name = reset_netbios_name
self.rid_base = rid_base
self.secondary_rid_base = secondary_rid_base
- self.no_msdcs = no_msdcs
self.add_sids = add_sids
self.enable_compat = enable_compat
self.smbd_user = smbd_user