Bug 33698 - Share definition does not get removed if samba option is disabled
Share definition does not get removed if samba option is disabled
Status: NEW
Product: UCS
Classification: Unclassified
Component: Samba
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-10 11:45 CET by Tim Petersen
Modified: 2022-12-20 09:59 CET (History)
3 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?: 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?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2013120621005229
Bug group (optional): bitesize
Max CVSS v3 score:
requate: Patch_Available+


Attachments
fixbug33698.patch (11.19 KB, patch)
2017-04-20 19:25 CEST, Arvid Requate
Details | Diff
fixbug33698.patch (11.46 KB, patch)
2017-04-20 19:39 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2013-12-10 11:45:45 CET
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 2014-01-06 10:32:44 CET
The module is shipped as part of univention-samba.
Comment 2 Arvid Requate univentionstaff 2017-04-20 19:25:20 CEST
Created attachment 8787 [details]
fixbug33698.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 3 Arvid Requate univentionstaff 2017-04-20 19:39:38 CEST
Created attachment 8789 [details]
fixbug33698.patch

This one applies to univention-samba.