Reduce duplicate symbols, merge server_id

Andrew Bartlett abartlet at samba.org
Tue May 3 02:06:51 MDT 2011


On Tue, 2011-05-03 at 08:05 +0200, Volker Lendecke wrote:
> On Tue, May 03, 2011 at 09:05:31AM +1000, Andrew Bartlett wrote:
> > No, the server_id in source3 and source4 represent exactly the same
> > concept, as is to be expected as they were originally derived from each
> > other.  Furthermore, the notify code relies on server_id, and the notify
> > ndr functions are also in duplicate (the Samba3 notify.idl is a
> > superset), so the least disruptive course of action is to bring these
> > structures in common.
> > 
> > Furthermore, interprocess messaging will be a very important part of any
> > future combined Samba 4.0.
> > 
> > Perhaps there is technical issue with the merged structure I'm not aware
> > of?  
> 
> If they serve the exect same purpose, why do we need to add
> structure elements that the respective opposite code does
> not use? What functional requirement is there for the id2
> field that can not be fulfilled by the unique_id field?

Following up from our discussion on IRC, I was mistaken about the role
of the unique_id field, so my proposal reflected that confusion.

I incorrectly saw unique_id as associated 'check' data, used to validate
the pid/vnn combination, not part of the server_id key itself. 

As I now understand it unique_id is expected to be used as the 'within a
process' identifier if Samba3 ever processes more than one connection
per process.  As such, cluster_id_equal()/procid_equal() should be
modified to also consider unique_id.  That is, the lookup key is should
be always (vnn, pid, unique_id). 

What I'm confused about is how this will interact with serverid.tdb.  I
my proposal to use id2, it was clear that this combines with pid and vnn
to form the lookup key and retrieves a unique_id.  How should this code
work if there are multiple unique_id values for a given (pid, vnn)
tuple?

I don't particularly expect that Samba4 will use the tdb based messaging
in the long term, but I could certainly imagine it registering it's
server_id with a 'use domain sockets' flag to assist interprocess
communication, or using the tdb scheme as an interim interoperability
measure. 

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list