dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From 92302f81c25bc2b5ce9dbc2236c671d591fe69e0 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Fri, 12 Aug 2016 16:41:21 +0200
Subject: [PATCH 090/102] CONFIG: re_expression is an allowed option for all
 domains
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
(cherry picked from commit 6d19051c50c10fc4de056ebb385c63ec0ed221cb)
---
 src/config/SSSDConfig/__init__.py.in | 1 +
 src/config/SSSDConfigTest.py         | 2 ++
 src/config/cfg_rules.ini             | 1 +
 src/config/etc/sssd.api.conf         | 1 +
 4 files changed, 5 insertions(+)

diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in
index 3114d1da9fe8e833ae4050ac343ba2763dc56e68..ac538788b9878dc2613cb48b7483d392cca41d47 100644
--- a/src/config/SSSDConfig/__init__.py.in
+++ b/src/config/SSSDConfig/__init__.py.in
@@ -164,6 +164,7 @@ option_strings = {
     'subdomain_inherit' : _('List of options that should be inherited into a subdomain'),
     'cached_auth_timeout' : _('How long can cached credentials be used for cached authentication'),
     'full_name_format' : _('Printf-compatible format for displaying fully-qualified names'),
+    're_expression' : _('Regex to parse username and domain'),
 
     # [provider/ipa]
     'ipa_domain' : _('IPA domain'),
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py
index bfb247ac45f752397000d43c54a20e57c6fbd9a5..00c688f1e57c5f481d3adba2fe0374145216bc33 100755
--- a/src/config/SSSDConfigTest.py
+++ b/src/config/SSSDConfigTest.py
@@ -561,6 +561,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase):
             'subdomain_refresh_interval',
             'subdomain_inherit',
             'full_name_format',
+            're_expression',
             'cached_auth_timeout']
 
         self.assertTrue(type(options) == dict,
@@ -929,6 +930,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase):
             'subdomain_refresh_interval',
             'subdomain_inherit',
             'full_name_format',
+            're_expression',
             'cached_auth_timeout']
 
         self.assertTrue(type(options) == dict,
diff --git a/src/config/cfg_rules.ini b/src/config/cfg_rules.ini
index febe4289832f3778b7e974ef4e8b3f6d9d8bffd8..bd0116f334e2605e7671a208225761421511a75a 100644
--- a/src/config/cfg_rules.ini
+++ b/src/config/cfg_rules.ini
@@ -288,6 +288,7 @@ option = subdomain_inherit
 option = cached_auth_timeout
 option = wildcard_limit
 option = full_name_format
+option = re_expression
 
 #Entry cache timeouts
 option = entry_cache_user_timeout
diff --git a/src/config/etc/sssd.api.conf b/src/config/etc/sssd.api.conf
index 2a43b8b68051c5133abc65a78f0d4a5561e760bd..5ac6f79521f5f776fc17319c3afb87d44961afca 100644
--- a/src/config/etc/sssd.api.conf
+++ b/src/config/etc/sssd.api.conf
@@ -148,6 +148,7 @@ subdomain_refresh_interval = int, None, false
 subdomain_inherit = str, None, false
 cached_auth_timeout = int, None, false
 full_name_format = str, None, false
+re_expression = str, None, false
 
 #Entry cache timeouts
 entry_cache_user_timeout = int, None, false
-- 
2.4.11