Bug 577263

Summary: Changing authentication providers crashes authconfig
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
Component: authconfigAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: authconfig-6.1.3-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-22 22:57:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Gallagher 2010-03-26 15:25:39 UTC
Description of problem:
If you save a configuration, then start authconfig up and change the authentication provider, authconfig will crash with the python backtrace:


Traceback (most recent call last):
  File "/usr/sbin/authconfig-gtk", line 619, in <module>
    module.apply()
  File "/usr/sbin/authconfig-gtk", line 574, in apply
    self.info.writeChanged(self.pristineinfo)
  File "/usr/share/authconfig/authinfo.py", line 3513, in writeChanged
    ret = ret and group.saveFunction()
  File "/usr/share/authconfig/authinfo.py", line 2828, in writeSSSD
    self.changeProvider(domain, 'krb5', 'auth')
  File "/usr/share/authconfig/authinfo.py", line 2808, in changeProvider
    domain.add_provider(newprovider, subtype)
  File "/usr/lib/python2.6/site-packages/SSSDConfig.py", line 1002, in add_provider
    raise ProviderSubtypeInUse(with_this_type[0][0])
SSSDConfig.ProviderSubtypeInUse: ldap

 The cause of this is a bad call to domain.remove_provider() on line 2807 of authinfo.py  Calling remove_provider() needs to pass the value of the provider subtype, not the provider type. In this case, "domain.remove_provider('ldap')" will be a no-op, and the subsequent domain.add_provider() will crash with the error ProviderSubtypeInUse.

To fix this, the line should read
domain.remove_provider(subtype)



Version-Release number of selected component (if applicable):
authconfig-gtk-6.1.1-1.fc13.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Save a configuration with authconfig-gtk
2. Open authconfig-gtk again and change the authentication provider to a new value, then save it again.
3. Authconfig will crash trying to write out the new settings.
  
Actual results:
Authconfig crashes

Expected results:
The sssd.conf should reflect the new authentication provider.

Additional info:

Comment 1 Fedora Update System 2010-03-29 12:56:00 UTC
authconfig-6.1.2-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/authconfig-6.1.2-1.fc13

Comment 2 Fedora Update System 2010-04-01 19:28:47 UTC
authconfig-6.1.2-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update authconfig'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/authconfig-6.1.2-1.fc13

Comment 3 Fedora Update System 2010-04-07 20:30:51 UTC
authconfig-6.1.3-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/authconfig-6.1.3-1.fc13

Comment 4 Fedora Update System 2010-04-09 04:04:23 UTC
authconfig-6.1.3-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update authconfig'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/authconfig-6.1.3-1.fc13

Comment 5 Fedora Update System 2010-04-22 22:57:22 UTC
authconfig-6.1.3-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.