[Samba] The Recycled PIDs Fix
Manoj Dahal
mdahal at novell.com
Tue Jan 24 00:19:14 MST 2012
** Low Priority **
Hi Volker,
Thanks a lot for your response. I have some more doubts.
What is the issue with libsmbsharemodes to make it cluster aware?
If the serverid is included in libsmbsharemodes without the dbwrap for clustering,
I believe without the *_ctdb() calls and without the #ifdef CLUSTER_SUPPORT would be enough, right?
That is mainly re-writing dbwrap.c . Or in serverid.c should I replace the db_open() and other related calls by tdb_open() etc.
If any of my approaches looks fine, then I would like to submit the patch to you for review.
Thanks,
-Manoj
>>> Volker Lendecke <Volker.Lendecke at SerNet.DE> 1/20/2012 7:08 PM >>>
Hello!
On Fri, Jan 20, 2012 at 04:38:21AM -0700, Manoj Dahal wrote:
>
> This is regarding your fix on recycled PIDs. I am an NCP
> developer from Novell and we use libsmbsharemodes library
> from Samba for Cross Protocols Locks between NCP, Samba
> and others. I have few queries regarding your fix.
>
> In your fix, you have added a new field called 'unique_id'
> in the server_id structure
> and we need to pass this in our call to samba share mode
> APIs e.g. create_share_mode_entry().
>
> Also, you have introduced server
> registration/de-registration which is associated with
> 'unqiue_id'. If we use these new APIs
> then in which library from Samba do we need to link to?
> Or without calling serverid_register() can we directly
> pass any 'unique_id'
> while calling to create_share_mode_entry() and in that
> case whether this and other share mode APIs will work
> properly?
If you pass a random unique_id, the share mode entry will be
wiped once smbd reads it. You have to invent a unique_id,
fill a struct server_id with it and call serverid_register()
before using it. serverid_deregister() will remove that
registration again. Unfortunately we don't provide an API
to that functionality via libsmbsharemodes. It's not rocket
science, and I would be happy to relicense my contribution
to serverid.c under LGPL for inclusion into
libsmbsharemodes. The problem there is that serverid.c is
based on dbwrap for clustering, which libsmbsharemodes is
not. So you will have to rewrite significant portions of
serverid.c to directly open the tdb file.
With best regards,
Volker Lendecke
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba
mailing list