Latest leases patchset - getting there !

Stefan (metze) Metzmacher metze at samba.org
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
> async for the SMB2_FILE_RENAME_INFORMATION_INTERNAL
> call.
> 
> Full patch that goes on top of master attached,
> includes enhanced smb2.lease.v2_rename 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)
and
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
https://git.samba.org/?p=metze/samba/wip.git;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.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141205/908bd0ab/attachment.pgp>


More information about the samba-technical mailing list