Bug 55077 - samba-shares: could not read/write tmp file /var/cache/univention-directory-listener/samba-shares.oldObject
samba-shares: could not read/write tmp file /var/cache/univention-directory-l...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Mika Westphal
Florian Best
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-08 13:44 CEST by stefan.bauer
Modified: 2024-02-23 13:46 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103
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 stefan.bauer 2022-08-08 13:44:48 CEST
After updating to UCS5, changes to samba shares in UCS gui have no effect.

I tried renaming the share name (removing a whitespace)

listener.log reports:

08.08.22 13:26:00.777  LISTENER    ( PROCESS ) : updating 'cn=Formulare und Vordrucke,cn=shares,dc=company,dc=gmbh' command r
08.08.22 13:26:00.777  LISTENER    ( PROCESS ) : updating 'cn=FormulareundVordrucke,cn=shares,dc=company,dc=gmbh' command a
08.08.22 13:26:00.810  LISTENER    ( ERROR   ) : samba-shares: could not read/write tmp file /var/cache/univention-directory-listener/samba-shares.oldObject (write() argument must be str, not bytes)
08.08.22 13:26:00.886  LISTENER    ( PROCESS ) : updating 'cn=FormulareundVordrucke,cn=shares,dc=company,dc=gmbh' command m

Corresponding /etc/samba/shares.conf.d/... file did not receive any change.

I can reproduce this with 3 independent UCS5 installations.

Version is ucs 5.0-2

any help is greatly appreciated.
Comment 1 Mika Westphal univentionstaff 2022-08-09 15:18:54 CEST
When I uncommented the exception handling the following exception occur:

Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 115, in handler
    pickle.dump({"dn": dn, "old": old}, fd)
TypeError: write() argument must be str, not bytes
09.08.22 15:16:21.712  LISTENER    ( PROCESS ) : Writing /etc/exports with 11 lines
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 118, in handler
    p = pickle.load(fd)
TypeError: a bytes-like object is required, not 'str'
Comment 2 Mika Westphal univentionstaff 2022-08-12 15:37:00 CEST
univention-samba4.yaml
8a77e442e122 | Bug #55077: fixed pickle handling in the listener when renaming a share in univention-samba4

univention-samba4 (9.0.8-5)
8a77e442e122 | Bug #55077: fixed pickle handling in the listener when renaming a share in univention-samba4

univention-samba.yaml
00218cac8451 | Bug #55077: fixed pickle handling in the listener when renaming a share in univention-samba

univention-samba (14.0.5-7)
00218cac8451 | Bug #55077: fixed pickle handling in the listener when renaming a share in univention-samba

univention-samba (14.0.5-6)
1cb54cb24fa6 | Revert "Bug #55077: fixed the error when renaming a share"
fccaa24a0531 | Bug #55077: fixed the error when renaming a share
Comment 3 Florian Best univentionstaff 2022-08-15 18:35:34 CEST
OK: samba shares can be renamed and the configuration file integrity is ensured.
OK: Code review
OK: YAML