Latest leases patchset - getting there !

Stefan (metze) Metzmacher metze at
Fri Dec 5 01:43:40 MST 2014

Hi Jeremy,

> New turbo enhanced version :-).
> With leases you can have multiple RH
> lease handles, and if one of them renames
> the file you must break to a R lease,
> *and wait for the client response before
> doing the rename*.
> This means that I had to make SMB2 setinfo
> call.
> Full patch that goes on top of master attached,
> includes enhanced test
> that shows the above behavior (we pass it :-).
> Please review and push (or comment :-).

Thanks for the patches!

There're one thing which needs be fixed...
defer_rename_done needs to call
change_to_user(req->tcon->compat, req->session->compat->vuid)
set_current_server(req->tcon->compat, 0, true)
similar to smbd_smb2_request_check_tcon().

A generic intrastructure for this problem is work in progress;a=shortlog;h=refs/heads/master4-tevent
but that is a 4.3 thing.

I'm unsure what happens in the dynamic share case
when one file is renamed. Opening the other file
would be rejected by NT_STATUS_INVALID_PARAMTER
because the file name doesn't match anymore.

I also wonder what happens when the destination already exists
with SHARE_NONE and a HANDLE lease.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the samba-technical mailing list