Bug 1631556 - authconfig --updateall fails with TypeError: 'int' object is not callable
Summary: authconfig --updateall fails with TypeError: 'int' object is not callable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: authselect
Version: 28
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Březina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-20 20:52 UTC by Kevin Adler
Modified: 2018-10-02 19:33 UTC (History)
1 user (show)

Fixed In Version: authselect-1.0.1-2.fc28 authselect-1.0.1-2.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-01 02:47:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kevin Adler 2018-09-20 20:52:16 UTC
Description of problem:
authconfig --updateall fails with

Traceback (most recent call last):
  File "/sbin/authconfig", line 585, in <module>
    main()
  File "/sbin/authconfig", line 564, in main
    authcompat = AuthCompat()
  File "/sbin/authconfig", line 435, in __init__
    self.sysconfig = EnvironmentFile(Path.System('authconfig'))
  File "/usr/lib/python3.6/site-packages/authselect/authcompat_EnvironmentFile.py", line 42, in __init__
    self.read()
  File "/usr/lib/python3.6/site-packages/authselect/authcompat_EnvironmentFile.py", line 53, in read
    self.delimiter, self.quotes)
  File "/usr/lib/python3.6/site-packages/authselect/authcompat_EnvironmentFile.py", line 162, in Parse
    value = EnvironmentFile.Line.Unescape(match.group(6), quotes)
  File "/usr/lib/python3.6/site-packages/authselect/authcompat_EnvironmentFile.py", line 207, in Unescape
    if i + 1 >= length(value):
TypeError: 'int' object is not callable


The problem is due to this line:

if i + 1 >= length(value):

It should be this instead:

if i + 1 >= len(value):


Version-Release number of selected component (if applicable): 1.0-3.fc28.x86_64


How reproducible: Always


Steps to Reproduce:
1. From root shell, run authconfig --updateall

Actual results:
Crashes with above error.

Expected results:
Should not crash

Additional info:

Some analysis by other IBMers seems to be that this may be the cause of a problem during F27->F28 upgrade which resulted in /var/run/nologin being regenerated during boot and never cleared, preventing login via VT/sudo/etc. Part of the remediation was to boot in single-user mode and run authselect --updateall which is how I discovered this bug. After fixing the buggy Python code, I was able to run the command and then log in was fixed.

Comment 1 Pavel Březina 2018-09-24 10:26:52 UTC
Thank you.

Upstream ticket:
https://github.com/pbrezina/authselect/issues/92

Comment 2 Fedora Update System 2018-09-27 13:27:37 UTC
authselect-1.0.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-18cdaf94c1

Comment 3 Fedora Update System 2018-09-27 13:33:20 UTC
authselect-1.0.1-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-29bdc75404

Comment 4 Fedora Update System 2018-09-27 16:43:28 UTC
authselect-1.0.1-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-29bdc75404

Comment 5 Fedora Update System 2018-09-27 18:42:46 UTC
authselect-1.0.1-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-18cdaf94c1

Comment 6 Fedora Update System 2018-09-28 07:31:25 UTC
authselect-1.0.1-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-738a0e5f83

Comment 7 Fedora Update System 2018-09-28 07:31:41 UTC
authselect-1.0.1-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-00221867d7

Comment 8 Fedora Update System 2018-09-28 19:35:09 UTC
authselect-1.0.1-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-738a0e5f83

Comment 9 Fedora Update System 2018-09-28 20:31:54 UTC
authselect-1.0.1-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-00221867d7

Comment 10 Fedora Update System 2018-10-01 02:47:33 UTC
authselect-1.0.1-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-10-02 19:33:17 UTC
authselect-1.0.1-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.