summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/SSSDConfig/__init__.py.in5
-rwxr-xr-xsrc/config/SSSDConfigTest.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in
index 32613543..b90a8e10 100644
--- a/src/config/SSSDConfig/__init__.py.in
+++ b/src/config/SSSDConfig/__init__.py.in
@@ -1254,6 +1254,11 @@ class SSSDDomain(SSSDConfigObject):
if self.options.has_key(option):
del self.options[option]
+ # Remove this provider from the option list
+ option = '%s_provider' % provider_type
+ if self.options.has_key(option):
+ del self.options[option]
+
self.providers.remove((provider, provider_type))
class SSSDConfig(SSSDChangeConf):
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py
index eefbe786..b03223f4 100755
--- a/src/config/SSSDConfigTest.py
+++ b/src/config/SSSDConfigTest.py
@@ -957,6 +957,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase):
# Remove the local ID provider and add an LDAP one
# LDAP ID providers can also use the krb5_realm
domain.remove_provider('id')
+ self.assertFalse(domain.options.has_key('id_provider'))
domain.add_provider('ldap', 'id')
@@ -981,6 +982,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase):
# Remove the auth domain and verify that the options
# revert to the backup_list
domain.remove_provider('auth')
+ self.assertFalse(domain.options.has_key('auth_provider'))
options = domain.list_options()
self.assertTrue(type(options) == dict,
@@ -1003,14 +1005,17 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase):
# Test removing nonexistent provider - Real
domain.remove_provider('id')
+ self.assertFalse(domain.options.has_key('id_provider'))
# Test removing nonexistent provider - Bad backend type
# Should pass without complaint
domain.remove_provider('id')
+ self.assertFalse(domain.options.has_key('id_provider'))
# Test removing nonexistent provider - Bad provider type
# Should pass without complaint
domain.remove_provider('nosuchprovider')
+ self.assertFalse(domain.options.has_key('nosuchprovider_provider'))
def testGetOption(self):
domain = SSSDConfig.SSSDDomain('sssd', self.schema)