Bug 33846

Summary: Share definition does not get removed if samba option is disabled
Product: UCS Reporter: Arvid Requate <requate>
Component: Samba4Assignee: Samba maintainers <samba-maintainers>
Status: RESOLVED WONTFIX QA Contact: Samba maintainers <samba-maintainers>
Severity: normal    
Priority: P5 CC: gohmann, petersen, requate, vidjaja
Version: UCS 4.2Flags: requate: Patch_Available+
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=33698
https://forge.univention.org/bugzilla/show_bug.cgi?id=44423
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?: 1: Will affect a very few installed domains How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034 Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: 2013120621005229 Bug group (optional):
Max CVSS v3 score:
Attachments: fixbug33846.patch

Description Arvid Requate univentionstaff 2014-01-06 10:33:42 CET
The module is shipped as part of univention-samba4 as well.



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

Seen at ticket #2013120621005229:

If disabling the "samba" option within UMC at a share, the share definition in filesystem (/etc/samba/shares.conf.d/) won't be removed. Seems to be related to the listener module, I suppose this should be done there.

Discovered in UCS 3.1-1, reproduceable with UCS 3.2
Comment 1 Arvid Requate univentionstaff 2017-04-20 19:27:01 CEST
Created attachment 8788 [details]
fixbug33846.patch

Apparently the listener only calls the module if the objectclass filter specified in the module matches the new object:

'(&(objectClass=univentionShare)(objectClass=univentionShareSamba))'

The attached patch fixes this:

* let the module be called also if only the old object had the samba option
* sanitize the share path (against ../../../../etc/passwd)
* skip samba reload in postrun in case the handler didn't need to do anything
Comment 2 Ingo Steuwer univentionstaff 2020-07-03 20:52:05 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.