Bug 53458 - samba-shares.py: TypeError: cannot use a string pattern on a bytes-like object
samba-shares.py: TypeError: cannot use a string pattern on a bytes-like object
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Florian Best
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-17 07:15 CEST by Florian Best
Modified: 2021-06-30 18:54 CEST (History)
1 user (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):
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 2021-06-17 07:15:21 CEST
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in handler
    new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], []))
  File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 293, in <listcomp>
    new_aces = set(sum([re.findall(re_ace, acl) for acl in new['univentionShareSambaBaseDirAppendACL']], []))
  File "/usr/lib/python3.7/re.py", line 223, in findall
    return _compile(pattern, flags).findall(string)
TypeError: cannot use a string pattern on a bytes-like object
Comment 1 Florian Best univentionstaff 2021-06-17 10:34:52 CEST
Fixed the traceback and additional errors which were contained in the listener.
Also migrated to new features like @SetUid(0).

univention-samba4.yaml
eaeeb5491607 | Changelog Bug #53458

univention-samba4 (9.0.6-2)
1c08d152a8b8 | Bug #53458: use new features in samba-shares.py listener
f3eb2b54eb56 | Bug #53458: fix Python 3 migration of samba-shares.py listener
eaeeb5491607 | Changelog Bug #53458

univention-samba.yaml
eaeeb5491607 | Changelog Bug #53458

univention-samba (14.0.4-3)
1c08d152a8b8 | Bug #53458: use new features in samba-shares.py listener
f3eb2b54eb56 | Bug #53458: fix Python 3 migration of samba-shares.py listener
eaeeb5491607 | Changelog Bug #53458
Comment 2 Arvid Requate univentionstaff 2021-06-28 19:14:16 CEST
Verified:
* Code review
* Jenkins tests
* Advisories