Univention Bugzilla – Bug 53414
KeyError: 'univentionSharePath' in samba-shares when removing group-shares
Last modified: 2021-06-30 18:54:21 CEST
When deleting classshares, I get a traceback in var/log/univention/listener.log Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 283, in handler ['samba-tool', 'ntacl', 'get', '--as-sddl', new['univentionSharePath'][0]], KeyError: 'univentionSharePath' l.279: if 'univentionShareSambaBaseDirAppendACL' in new or 'univentionShareSambaBaseDirAppendACL' in old: So far univentionShareSambaBaseDirAppendACL is only used in uas to set nt acls on group-shares.
Still present with UCS@school 5.0: 17.06.21 08:20:18.743 LISTENER ( PROCESS ) : updating 'cn=testou2252-z3i7rgc3oo,cn=shares,ou=testou2252,dc=autotest201,dc=local' command d 17.06.21 08:20:18.773 LISTENER ( PROCESS ) : Writing /etc/exports with 10 lines Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 260, in handler share_path = new['univentionSharePath'][0].decode('UTF-8') KeyError: 'univentionSharePath' 17.06.21 08:20:18.785 LISTENER ( WARN ) : at least one delete handler failed
Fixed by simply ignoring to set NTACL's on shares which are removed (indicated by `not new`): univention-samba4.yaml 7cd1eccfb9fc | Bug #53414: prevent listener traceback when removing samba share with NT ACLs univention-samba4 (9.0.6-3) 7cd1eccfb9fc | Bug #53414: prevent listener traceback when removing samba share with NT ACLs univention-samba.yaml 7cd1eccfb9fc | Bug #53414: prevent listener traceback when removing samba share with NT ACLs univention-samba (14.0.4-4) 7cd1eccfb9fc | Bug #53414: prevent listener traceback when removing samba share with NT ACLs
Verified: * Jenkins Tests * Code review * Advisory
<https://errata.software-univention.de/#/?erratum=5.0x42> <https://errata.software-univention.de/#/?erratum=5.0x43>