Re: configuration, ldap and NetInfo

Robert Frank (frank@ifi.unibas.ch)
Fri, 17 Apr 1998 11:54:04 +0200

Date:	Fri, 17 Apr 1998 11:54:04 +0200
From:	Robert Frank <frank@ifi.unibas.ch>
Subject: Re: configuration, ldap and NetInfo
To:	samba-technical@samba.anu.edu.au

<nofill> > Robert Frank wrote:
> >
> > I had a look at the samba as of April 9th, in regards of adding
> > NetInfo, ldap, or whatever else. I mainly looked through params.c and
> > loadparams.c.
> >
> > I was a bit anoyed to see some non-samba related code (SWAT) in the
> > sources. I think that samba and configuration managers must be
> > completely decoupled (in regards to the source code).
> >
>
> Well, one of the reasons for having them tightly coupled
> is that swat automatically picks up any changes that
> are made in the main Samba parameters. This is a significant
> win IMHO.
</nofill>

No reason to encode that into samba. As I said, a startup flag for e.g.
testparm, could do the same. I'd very much favour that, as it would enable
other frontends (e.g. SambaManger) to make use of it.

<nofill>
> > First of all, NetInfo, and probalbly any other database interface,
> > delivers lists as such (and not as a string of values), thus, I'd like
> > to change the syntax of the smb.conf file (very slightly):
> >
>
> > - a parameter assignment is terminated by a semicolon
>
> I would strongly suggest this not be done. It would break
> all current smb.conf files. Changing whitespace is fine
> (if carefully examined for effects on current smb.conf files)
> but forcing all parameter = xxx lines to end with a semicolon
> would break too much.
>
> Remember, we may have over 1,000,000 users out there (at the
> last estimate), and when they upgrade they don't want to change
> the smb.conf files.
I know, I know.
But how do we parse lists with strings containing spaces?
e.g. hide files = .NeXT .my defs .DESKTOP
where .my defs is a folder? (Yes, people who use GUIs do assign names with spaces!)

what I would like to have (internally) is:
hide files: .NeXT
.my defs
.DESKTOP
as a list of pointers to strings, where the list is NULL terminated.
</nofill>

You could argue to use a list separator, but, as I said, this gets messy.
Right now, samba will accept several different separators, but not all on
all occasions.

<nofill>
What I wanted to have (in smb.conf) is:
"hide files" = .NeXT ".my defs" .DESKTOP;

Now, I could go for:
hide files = .NeXT ".my defs" .DESKTOP
</nofill>

and then accept escapes (at least \" to include a " and \\ for a \). It
just makes parsing a little harder.

The other option, of course, is to have two parsers, one for the old style
and one for the new style, where the new style smb.conf would have to
start with some kind of flag
<nofill>
(e.g. #Version 2 a la postscript header)

-------------------------------------
Institut fuer Informatik tel +41 (0)61 321 99 67
Universitaet Basel fax. +41 (0)61 321 99 15
Robert Frank
Mittlere Strasse 142 rfc822: frank@ifi.unibas.ch (NeXT,MIME mail ok)
CH-4056 Basel (remove any no_spam_ from my return address)
Switzerland