|
|
c58629 |
From e553b66e54af3bf981501bca57fb22caaa8e8305 Mon Sep 17 00:00:00 2001
|
|
|
c58629 |
From: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
c58629 |
Date: Thu, 9 Nov 2017 09:57:47 +0200
|
|
|
c58629 |
Subject: [PATCH] ipaserver/plugins/trust.py; fix some indenting issues
|
|
|
c58629 |
|
|
|
c58629 |
Reviewed-By: Christian Heimes <cheimes@redhat.com>
|
|
|
c58629 |
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
|
|
|
c58629 |
---
|
|
|
c58629 |
ipaserver/plugins/trust.py | 17 +++++++++--------
|
|
|
c58629 |
1 file changed, 9 insertions(+), 8 deletions(-)
|
|
|
c58629 |
|
|
|
c58629 |
diff --git a/ipaserver/plugins/trust.py b/ipaserver/plugins/trust.py
|
|
|
c58629 |
index ecc5fa0b22f94de05cc5282758be093f0cfca13f..d01529ee022d4a4f9b671a8f06156ed450326041 100644
|
|
|
c58629 |
--- a/ipaserver/plugins/trust.py
|
|
|
c58629 |
+++ b/ipaserver/plugins/trust.py
|
|
|
c58629 |
@@ -280,15 +280,17 @@ def generate_creds(trustinstance, style, **options):
|
|
|
c58629 |
elif style == CRED_STYLE_KERBEROS:
|
|
|
c58629 |
sp = admin_name.split('\\')
|
|
|
c58629 |
if len(sp) > 1:
|
|
|
c58629 |
- sp = [sp[1]]
|
|
|
c58629 |
+ sp = [sp[1]]
|
|
|
c58629 |
else:
|
|
|
c58629 |
- sp = admin_name.split(sep)
|
|
|
c58629 |
+ sp = admin_name.split(sep)
|
|
|
c58629 |
if len(sp) == 1:
|
|
|
c58629 |
- sp.append(trustinstance.remote_domain.info['dns_domain'].upper())
|
|
|
c58629 |
+ sp.append(trustinstance.remote_domain
|
|
|
c58629 |
+ .info['dns_domain'].upper())
|
|
|
c58629 |
creds = u"{name}%{password}".format(name=sep.join(sp),
|
|
|
c58629 |
password=password)
|
|
|
c58629 |
return creds
|
|
|
c58629 |
|
|
|
c58629 |
+
|
|
|
c58629 |
def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
|
|
|
c58629 |
"""
|
|
|
c58629 |
First, we try to derive the parameters of the ID range based on the
|
|
|
c58629 |
@@ -319,7 +321,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
|
|
|
c58629 |
# CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System
|
|
|
c58629 |
info_filter = '(objectClass=msSFU30DomainInfo)'
|
|
|
c58629 |
info_dn = DN('CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System')\
|
|
|
c58629 |
- + basedn
|
|
|
c58629 |
+ + basedn
|
|
|
c58629 |
|
|
|
c58629 |
# Get the domain validator
|
|
|
c58629 |
domain_validator = ipaserver.dcerpc.DomainValidator(myapi)
|
|
|
c58629 |
@@ -367,7 +369,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
|
|
|
c58629 |
|
|
|
c58629 |
base_id = int(info.get('msSFU30OrderNumber')[0])
|
|
|
c58629 |
range_size = (1 + (max_id - base_id) // DEFAULT_RANGE_SIZE)\
|
|
|
c58629 |
- * DEFAULT_RANGE_SIZE
|
|
|
c58629 |
+ * DEFAULT_RANGE_SIZE
|
|
|
c58629 |
|
|
|
c58629 |
# Second, options given via the CLI options take precedence to discovery
|
|
|
c58629 |
if options.get('range_type', None):
|
|
|
c58629 |
@@ -595,11 +597,10 @@ class trust(LDAPObject):
|
|
|
c58629 |
pass
|
|
|
c58629 |
else:
|
|
|
c58629 |
for entry in entries:
|
|
|
c58629 |
- add_message(
|
|
|
c58629 |
+ add_message(
|
|
|
c58629 |
options['version'],
|
|
|
c58629 |
result,
|
|
|
c58629 |
- BrokenTrust(domain=entry.single_value['cn'])
|
|
|
c58629 |
- )
|
|
|
c58629 |
+ BrokenTrust(domain=entry.single_value['cn']))
|
|
|
c58629 |
|
|
|
c58629 |
|
|
|
c58629 |
@register()
|
|
|
c58629 |
--
|
|
|
c58629 |
2.13.6
|
|
|
c58629 |
|