Bug 51360 - S4-Connector Traceback: TypeError: argument 2 must be heimdal.krb5Salt, not None
S4-Connector Traceback: TypeError: argument 2 must be heimdal.krb5Salt, not None
Status: RESOLVED INVALID
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on: 50475
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-26 15:50 CEST by Florian Best
Modified: 2020-05-26 15:59 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Regression
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2020-05-26 15:50:42 CEST
I found a traceback in my connector-s4.log after univention-app install samba4:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1566, in sync_to_ucs
    f(self, property_type, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/password.py", line 747, in password_sync_s4_to_ucs
    krb5Key_new = calculate_krb5key(unicodePwd_attr, supplementalCredentials, int(msDS_KeyVersionNumber))
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/password.py", line 72, in calculate_krb5key
    keys.append(heimdal.asn1_encode_key(key, None, kvno))
TypeError: argument 2 must be heimdal.krb5Salt, not None

+++ This bug was initially created as a clone of Bug #50475 +++

base/univention-python-heimdal should be migrated to python 3.
Comment 1 Arvid Requate univentionstaff 2020-05-26 15:53:18 CEST
test/ucs-test/tests/51_samba4/41samba-tool_user_password_change should trigger this, but maybe we don't check for a reject there.

https://jenkins.knut.univention.de:8181/job/UCS-4.4/job/UCS-4.4-4/job/AutotestJoin/SambaVersion=s4,Systemrolle=master-part-II/lastCompletedBuild/testReport/51_samba4/41samba-tool_user_password_change/history/
Comment 2 Florian Best univentionstaff 2020-05-26 15:54:25 CEST
Seems to happen when changing "unicodePwd" of a user in Samba.
Comment 3 Arvid Requate univentionstaff 2020-05-26 15:56:32 CEST
May be caused by http://errata.software-univention.de/ucs/4.4/477.html
Comment 4 Florian Best univentionstaff 2020-05-26 15:59:03 CEST
I had an old version of python-univention-heimdal installed :-/

 *** 9.0.0-2-python3-3A~4.4.0.201912091038 500
        500 http://omar.knut.univention.de/build2 ucs_4.4-0-python3/amd64/ Packages
        100 /var/lib/dpkg/status
     9.0.0-4A~4.4.0.202003111158 500
        500 http://omar.knut.univention.de/build2 ucs_4.4-0-ucs4.4-4/amd64/ Packages


This was fixed in git:78c4992e35e2664c90f95b7c31a7cb50e67618bf.