Bug 1301303 - sss_obfuscate: SyntaxError: Missing parentheses in call to 'print'
sss_obfuscate: SyntaxError: Missing parentheses in call to 'print'
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sssd (Show other bugs)
22
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Lukas Slebodnik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-23 18:18 EST by Steven W. Elling
Modified: 2016-03-05 17:49 EST (History)
9 users (show)

See Also:
Fixed In Version: sssd-1.13.3-5.fc23 sssd-1.13.3-5.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-01 20:51:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sss_obfuscate patch (2.34 KB, patch)
2016-01-23 18:22 EST, Steven W. Elling
no flags Details | Diff

  None (edit)
Description Steven W. Elling 2016-01-23 18:18:00 EST
Description of problem:

Running sss_obfuscate results in a python error that prevents it from working properly.


Version-Release number of selected component (if applicable):

I'm including the python release for reference.

# rpm -qi -f $(readlink -f $(type -p sss_obfuscate)) $(readlink -f $(type -p python3))

Name        : sssd-tools
Version     : 1.13.3
Release     : 1.fc22
Architecture: x86_64
Install Date: Sat 23 Jan 2016 04:37:25 PM CST
Group       : Applications/System
Size        : 862707
License     : GPLv3+
Signature   : RSA/SHA256, Wed 16 Dec 2015 09:19:57 PM CST, Key ID 11adc0948e1431d5
Source RPM  : sssd-1.13.3-1.fc22.src.rpm
Build Date  : Wed 16 Dec 2015 06:44:59 AM CST
Build Host  : buildhw-01-nfs.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://fedorahosted.org/sssd/

Name        : python3
Version     : 3.4.2
Release     : 6.fc22
Architecture: x86_64
Install Date: Sat 19 Sep 2015 12:50:57 PM CDT
Group       : Development/Languages
Size        : 36419
License     : Python
Signature   : RSA/SHA256, Fri 10 Jul 2015 03:20:33 PM CDT, Key ID 11adc0948e1431d5
Source RPM  : python3-3.4.2-6.fc22.src.rpm
Build Date  : Thu 09 Jul 2015 01:14:07 PM CDT
Build Host  : buildvm-02.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.python.org/


How reproducible:


Steps to Reproduce:
1. dnf install sssd-ldap sssd-tools python-sssdconfig
2. Creating / modifying /etc/sssd/sssd.conf isn't necessary to demonstrate this bug
3. sss_obfuscate -d example.com

Actual results:

  File "/usr/sbin/sss_obfuscate", line 81
    print "Cannot read internal configuration files."
                                                    ^
SyntaxError: Missing parentheses in call to 'print'


Expected results:

Operator should be prompted for password twice then its obfuscated version should be written to /etc/sssd/sssd.conf


Additional info:

This also affects 23.

# rpm -qi -f $(readlink -f $(type -p sss_obfuscate)) $(readlink -f $(type -p python3))
Name        : sssd-tools
Version     : 1.13.3
Release     : 1.fc23
Architecture: x86_64
Install Date: Sun 10 Jan 2016 02:56:32 AM CST
Group       : Applications/System
Size        : 862675
License     : GPLv3+
Signature   : RSA/SHA256, Wed 16 Dec 2015 09:21:26 PM CST, Key ID 32474cf834ec9cba
Source RPM  : sssd-1.13.3-1.fc23.src.rpm
Build Date  : Wed 16 Dec 2015 02:10:35 AM CST
Build Host  : buildvm-10.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://fedorahosted.org/sssd/

Name        : python3
Version     : 3.4.3
Release     : 5.fc23
Architecture: x86_64
Install Date: Sun 10 Jan 2016 02:39:05 AM CST
Group       : Development/Languages
Size        : 36241
License     : Python
Signature   : RSA/SHA256, Mon 29 Jun 2015 10:23:56 AM CDT, Key ID 32474cf834ec9cba
Source RPM  : python3-3.4.3-5.fc23.src.rpm
Build Date  : Mon 29 Jun 2015 08:15:25 AM CDT
Build Host  : buildhw-08.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.python.org/
Comment 1 Steven W. Elling 2016-01-23 18:22 EST
Created attachment 1117500 [details]
sss_obfuscate patch

The attached patch fixes sss_obfuscate so that it works with newer versions of Python 3 where 'print' is now a function that requires the use of parentheses.
Comment 2 Lukas Slebodnik 2016-01-25 03:54:22 EST
Thank you very much for patch. This patch would not work with python2.
I know that sssd switched to python3 in fedora but we also need to support other
distributions. Are you willing to prepare patch which would work with python2 and python3?

If yes than you can attach git formated patch here or to upstream mailing list
@see https://fedorahosted.org/sssd/wiki/Contribute#Sendingpatchtoupstream
Comment 3 Lukas Slebodnik 2016-01-25 03:56:14 EST
Upstream ticket:
https://fedorahosted.org/sssd/ticket/2937
Comment 4 Lukas Slebodnik 2016-01-28 06:14:42 EST
It seems that you are not interested in updating patch.
I sent modified version of patch for review in upstream.
Modified patch works with python2 and python3 and does not introduce pep8 warnings.

Anyway, thank you very much for bug report and initial version of patch.
Comment 5 Lukas Slebodnik 2016-02-03 04:20:58 EST
master:
    37ea8e70fa13ff9ba563300fb15de0e5e6185d68
    11496692da75a330de01d5f15b7183d2439efd3c 

sssd-1-13:
    f61eb0c92251dbe65a2868aa1ded470d1f2739c8
    683b9d012117016483b99620c333be666a6c888e
Comment 6 Steven W. Elling 2016-02-03 22:11:41 EST
Sorry, I did not respond in a timely manner.

All work and no play makes Jack a dull boy.
Comment 7 Fedora Update System 2016-02-25 09:36:28 EST
sssd-1.13.3-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d872920f74
Comment 8 Fedora Update System 2016-02-25 09:36:47 EST
sssd-1.13.3-5.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-37a285ae63
Comment 9 Fedora Update System 2016-02-26 15:51:59 EST
sssd-1.13.3-5.fc22 has been pushed to the Fedora 22 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-2016-37a285ae63
Comment 10 Fedora Update System 2016-02-26 15:52:57 EST
sssd-1.13.3-5.fc23 has been pushed to the Fedora 23 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-2016-d872920f74
Comment 11 Fedora Update System 2016-03-01 20:51:12 EST
sssd-1.13.3-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-03-05 17:49:49 EST
sssd-1.13.3-5.fc22 has been pushed to the Fedora 22 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.