Samba and NetInfo and NIS and LDAP and ...

Luke Kenneth Casson Leighton lkcl at switchboard.net
Tue Apr 7 14:47:20 GMT 1998


hi robert,

um.. wow!  lots of work done here!  frank, i'm cc'ing the samba team on
this because there are people on it who are best qualified to review your
contributions.

also, since we last spoke, there's been a new list set up -
samba-technical at samba.anu.edu.au: some of your points would get a good
airing there (there are about 60 people on that list: we talk code and
developments and stuff :-)

so, samba-technical, meet mr robert frank.

robert, do you have cvs?  if so, can you get the main cvs branch out (see
http://samba.anu.edu.au/cvs.html).  until we get to review / incorporate
your work, you could verify that there are no clashes with current work.
if there are, send us a new patch (to samba-bugs at samba.anu.edu.au).

also, i recommend that you put a (gzipped?) diff -u -w -b -B file up on a
web-site somewhere, and post its url to samba-technical and the main samba
list, so that other people can look at it.  remember to tell them what
version of samba it patches against...

regarding your suggestion for parameters, there has been some discussion
of this already (http://samba.anu.edu.au/listproc/samba-technical) to put
in an admin "API" which we _hope_ would be based on the existing lp_xxx()
parameter system.  is this what you are referring to?

good luck, and thanks!

luke

On Tue, 7 Apr 1998, Robert Frank wrote:

> Hello  Luke ,
> 
> 
> It's been a while since I last wrote. In the mean time I've completed
> SambaManager and have resolved the password/NetInfo security problem. Now,
> of course, I'd like to get the NetInfo enhancements into the official
> Samba distribution, so that I don't have to modify the whole thing over
> and over again.
> 
> 
> For this to be done cleanly, I wish to discuss some options (I couldn't
> dig up Andrew's email address, could you forward? [and to whom else this
> may be of interest]).
> 
> 
> 
> 
> I can fully understand that it is not a good idea to reread a file each
> time just to get one parameter's value, however, when using NetInfo (or
> NIS+ or whatever), this is a possible good solution. For NetInfo, this
> means that I can stop searching for the parameter in the hierarchy when I
> find the first entry. This is the scheme used in sendmail. It would
> furthermore mean that all accesses are always uptodate.
> 
> 
> To get this done, I suggest implementing a switch which will select the
> appropriate service(s) [meaning NetInfo, NIS, NIS+, etc] when a resource
> is required, returning the value by a function call rather than reading a
> variable. If only the files are to be used, this would be bypassed
> entirely and the whole thing would work as it does now.
> 
> <nofill>
> Values designating resources could then be written as URLs, for example:
> 
>   /usr/local/samba/printcap        would access the samba printcap file
>   file:/usr/local/samba/printcap   is the same thing
>   netinfo:/printers                would mean to check NetInfo for the printers
> </nofill>
> 
> 
> Certain parameters can have several values (a list). Currently, the
> definition of lists is quite a mess. Some lists require whitespace, others
> accept commatas, other must use a slash, etc. I'd like to clean this up
> and introduce a new flag LIST. The idea is that other services, such as
> NetInfo, will automatically return a list when more than one value is
> given. Right now, I have to reconstruct the string when reading from
> NetInfo (taking into consideration the possibility of having to use a '/'
> to separate the items), only to have Samba reparse the whole thing in
> order to extract the values again.
> 
> 
> For the smb.conf file this would mean a slight change in syntax (it could
> be automatically transformed, so this ought not be too much of a problem):
> 
> <nofill>
> using EBNF:
> 
> smb.conf       == { comment } section_list { comment }
> comment        == '#' { any_character_expept_new_line } '\n'
> section_list   == '[' section_name ']' { comment } parameter_list
> section_name   == name_chars { name_chars }
> all_chars      == 'a' | 'b' | ... | 'z' | 'A' | 'B' | ... | 'Z'
> parameter_list == parameter { comment } { parameter }
> parameter      == parameter_name '=' value_list ';'           <<--  the ';' is new
> value_list     == value { comment } { value }
> value          == string | quoted_string
> parameter      == name_chars { name_chars } |
>                   '"' name_chars { space } { name_chars { space } } '"'   <<-- new
> space          == ' '
> value          == valid_char { valid_char } |
>                   '"' { { space } { valid_char } { space } }'"' <<-- new
> valid_char     == except for white space, any character 
>                   which is legal for the parameter and escaped characters
>                   \", \t, \n, \r, \e, \nnn
> 
> new:
>  - the parameter assignment is terminated by a semicolon
>    (makes it a lot easier to detect the end of a value list)
>  - value lists are simply a sequence of strings or quoted strings 
>    which may span several lines
>  - if a parameter name or value contains whitespace, it must be quoted
>  - parameter names and values may always be quoted
> </nofill>
> 
> 
> Furhermore, file locking (on the unix side, not SMB) needs some redoing.
> (Had to patch that quite a bit in order to get it working with BSD4.3.)
> 
> 
> And finally, I though it might be a good idea to parse not only the
> printcap (or the equivalent in SYSV) but also /etc/exports or
> /etc/dfs/dfstab to 'automagically' set up the same 'shares' as the server
> provides as nfs!
> 
> <nofill>
> You romments are eagerly awaited
> 
> -Robert
> 
> -------------------------------------
> 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 at ifi.unibas.ch (NeXT,MIME mail ok)  
> CH-4056 Basel           (remove any no_spam_ from my return address)
> Switzerland  
> </nofill>
> 

<a href="mailto:lkcl at samba.anu.edu.au" > Luke Kenneth Casson Leighton  </a>
<a href="http://mailhost.cb1.com/~lkcl"> Samba and Network Development </a>
<a href="http://www.samba.co.uk"       > Samba and Network Consultancy </a>




More information about the samba-technical mailing list