Bug 46975 - Lokale Share-Konfiguration per UCR
Lokale Share-Konfiguration per UCR
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 4.3
All Linux
: P4 enhancement (vote)
: UCS 4.3-1-errata
Assigned To: Felix Botner
Arvid Requate
:
: 34215 46859 (view as bug list)
Depends on: 12024
Blocks: 12041 12045 12052 13580
  Show dependency treegraph
 
Reported: 2018-05-07 21:15 CEST by Michael Grandjean
Modified: 2019-10-10 12:27 CEST (History)
7 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?:
School Customer affected?: Yes
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 Michael Grandjean univentionstaff 2018-05-07 21:15:15 CEST
I tried to use this feature to create a local share config like this:

###
[Temp]
copy = Marktplatz
###

According to Comment 11 of Bug #12024 it should be sufficient to use:

> ucr set samba/share/temp/options/copy=Marktplatz

Unfortunately, this just throws a traceback:

> root@school01:~# ucr set samba/share/temp/options/copy=Marktplatz
> Create samba/share/temp/options/copy
> Script: /etc/univention/templates/scripts/samba.local.config.py
> Traceback (most recent call last):
>   File "/etc/univention/templates/scripts/samba.local.config.py", line 40, in <module>
>     conf.read()
>   File "/usr/lib/pymodules/python2.7/univention/lib/share_restrictions.py", line 337, in read
>     self.read_ucr()
>   File "/usr/lib/pymodules/python2.7/univention/lib/share_restrictions.py", line 327, in read_ucr
>     func(ucr[key], *match.groups())
>   File "/usr/lib/pymodules/python2.7/univention/lib/share_restrictions.py", line 303, in _set_options
>     if match and share and options and value:
> NameError: global name 'match' is not defined
> Multifile: /etc/samba/smb.conf

Side note: I would be fine if I simply had to copy an additional config file to "/etc/samba/local.config.d/", but unfortunately the "include" statement is in "/etc/samba/local.config.conf" and this is rewritten via "samba.local.config.py" and overwrites any manual changes. This kind of renders a local.conf useless.


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

Die Konfiguration von Samba und Samba-Shares soll per UCR für rein lokale Einstellungen möglich sein. Dazu wird ein zusätzliches Paket implementieriert.

Die genaue Umsetzung ist im Reservierungssystem-Konzept beschrieben.
Comment 1 Felix Botner univentionstaff 2018-07-17 14:07:07 CEST
(1)
fixed include in /etc/univention/templates/scripts/samba.local.config.py (just try and ignore errors)

(2)
fixed traceback

(3)
added UCRV samba/include/configs. Comma separated list of file names to be included in /etc/samba/local.config.conf. Files have to exist in /etc/samba/local.config.d/ and must not end with ".local.config.conf".

univention-samba ff0cee9959c14fc8e3ca7295a0178fb2108e1e6c
yaml 7d2daf91616bc990bebd14423f4419a9723a835d
Comment 2 Felix Botner univentionstaff 2018-07-17 14:08:30 CEST
*** Bug 46859 has been marked as a duplicate of this bug. ***
Comment 3 Arvid Requate univentionstaff 2018-07-24 15:59:01 CEST
Ok, points (1) and (2) are good but I don't understand point (3) because I can do this:

echo -e "[myshare]\n\tfoo = bar" >> /etc/samba/local.conf
ucr commit /etc/samba/smb.conf
Comment 4 Felix Botner univentionstaff 2018-07-24 16:09:26 CEST
(In reply to Arvid Requate from comment #3)
> Ok, points (1) and (2) are good but I don't understand point (3) because I
> can do this:
> 
> echo -e "[myshare]\n\tfoo = bar" >> /etc/samba/local.conf
> ucr commit /etc/samba/smb.conf

oh, ok removed the "samba/include/configs" stuff

univention-samba fbd088703c00878fa3ad480635e3759ac794fe06
yaml bbdac1770d8cb822cc95a48f6be27affee1e7dc6
Comment 5 Arvid Requate univentionstaff 2018-07-24 16:31:24 CEST
Ok.
Comment 6 Arvid Requate univentionstaff 2018-07-25 13:56:33 CEST
<http://errata.software-univention.de/ucs/4.3/154.html>
Comment 7 Florian Best univentionstaff 2019-10-10 12:27:45 CEST
*** Bug 34215 has been marked as a duplicate of this bug. ***