Storing pipe opens in the share_mode db ?

Gerald (Jerry) Carter jerry at samba.org
Thu Jun 8 14:51:18 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan (metze) Metzmacher wrote:

> have you thought about how to create a unique uint32 id 
> for the returned files? the numbers are unique
> between multiple connections.
> 
> In samba4 I planed to implement this via internal 
> messaging, so all smb connections are asked for open
> files, when a NetFileEnum() comes in, but the unique ids were

This sounds really slow.  Maybe I'm being paranoid and
this is a corner case anyways.

> my big problem, as uint32 has to little bits to use
> something like this:
> 
> uint32 id = ((uint32)conn_id<<64) | (uint32 tcon_id)>>32| (uint32)fnum;
> (uint32 fnum because of smb2)
> 
> hmm, but for samba3 it might be ok, to use maybe this:
> uint32 id = conn_id << 15 | (0x8FFF|fnum);
> 
> so 17 or 18 bits for the connection (pid in samba3) and 14-15 
> bits for the fnum, as fnum's are not allocated per tcon
> in samba3.

Sounds reasonable.  But the problem is going in the
reverse direction.  Figuring out which smbd to send a
message to for a NetFileClose() request which only contains
the file_id.





cheers, jerry
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEiDlmIR7qMdg1EfYRAlXQAJwIAd7S1vCG0YVn99X/Q2QRIB86CwCg160f
ybw4LkOh02SO6WvmrhLIZuk=
=7KhC
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list