Bug 36581 - "Invalid smb.conf" output by testparm
"Invalid smb.conf" output by testparm
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-3-errata
Assigned To: Arvid Requate
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-11 23:08 CET by Arvid Requate
Modified: 2015-10-28 13:22 CET (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
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 Arvid Requate univentionstaff 2014-11-11 23:08:48 CET
The samba configuration parser has been reworked and now it seems to dislike the way we include files:

This is what samba-tool testparm thinks about a standard smb.conf with one share and two printers, included as usual via shares.conf/shares.conf.d and printers.conf/printers.conf.d :

==========================================================
[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = root Administrator @Printer-Admins
        read only = No
        include = /etc/samba/shares.conf.d/share1dcs

[share1dcs]
        path = /share1dcs
        valid users = @group2
        read only = No
        inherit acls = Yes
        include = /etc/samba/printers.conf.d/printer2dcs
        vfs objects = acl_xattr
        msdfs root = Yes

[printer2dcs]
        path = /tmp
        guest ok = Yes
        printable = Yes
        print ok = Yes
        printer name = printer2dcs
        force printername = Yes
        include = /etc/samba/printers.conf.d/printer1dcs

[printer1dcs]
        path = /tmp
        guest ok = Yes
        printable = Yes
        print ok = Yes
        printer name = printer1dcs
        force printername = Yes
ERROR: Invalid smb.conf
==========================================================

We should check if this can be improved to avoid unexpected behaviour of samba components.
Comment 1 Arvid Requate univentionstaff 2015-03-19 18:48:56 CET
Looks like this is the issue:

  winbind separator = +

And this is where it comes from in python/samba/netcmd/testparm.py:

        if winbind_separator == '+':
            logger.error(
                "'winbind separator = +' might cause problems with group "
                "membership.")
            valid = False

So we have three options:

a) ignore the message
b) patch the code
c) change the parameter value (e.g. make it adjustable via UCR).
Comment 2 Stefan Gohmann univentionstaff 2015-03-19 19:57:26 CET
(In reply to Arvid Requate from comment #1)
> Looks like this is the issue:
> 
>   winbind separator = +
> 
> And this is where it comes from in python/samba/netcmd/testparm.py:
> 
>         if winbind_separator == '+':
>             logger.error(
>                 "'winbind separator = +' might cause problems with group "
>                 "membership.")
>             valid = False
> 
> So we have three options:
> 
> a) ignore the message
> b) patch the code
> c) change the parameter value (e.g. make it adjustable via UCR).

I vote for c).
Comment 3 Arvid Requate univentionstaff 2015-10-08 18:03:55 CEST
This is a minor issue, I think it's not worth changing the winbind separator now.
I patched python/samba/netcmd/testparm.py instead, to issue a warning instead of an error. I guess this might even get accepted upstream.

Changelog adjusted.
Comment 4 Arvid Requate univentionstaff 2015-10-08 18:30:46 CEST
Ah, this is errata4.0-3, so I've merged the patch from 4.1 to errata4.0-3 and rebuilt samba there as well. I removed the UCS 4.1 changelog and added a yaml advisory instead.
Comment 5 Felix Botner univentionstaff 2015-10-22 14:42:12 CEST
OK - errata4-0-3
OK - 4.1-0
OK - YAML
Comment 6 Janek Walkenhorst univentionstaff 2015-10-28 13:22:53 CET
<http://errata.software-univention.de/ucs/4.0/346.html>