Latest leases patchset - getting there !

Stefan (metze) Metzmacher metze at
Fri Dec 5 06:54:39 MST 2014

Hi Jeremy,

> 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 think we need to change the data model for the

Maybe something like this:

diff --git a/source3/librpc/idl/leases_db.idl
index 2ab1591..f6a979d 100644
--- a/source3/librpc/idl/leases_db.idl
+++ b/source3/librpc/idl/leases_db.idl
@@ -15,9 +15,14 @@ interface leases_db
        } leases_db_key;

        typedef [public] struct {
-               uint32 num_file_ids;
-               [size_is(num_file_ids)] file_id ids[];
-               [string,charset(UTF8)] char *filename;
+               file_id id;
+               [string,charset(UTF8)] char *servicepath;
+               [string,charset(UTF8)] char *base_name;
                [string,charset(UTF8)] char *stream_name;
+       } leases_db_file;
+       typedef [public] struct {
+               uint32 num_files;
+               [size_is(num_filess)] leases_db_file files[];
        } leases_db_value;

I'm not sure about the servicepath, I took the same values
as we have in share_mode_data. But we need to maintain the names
per file_id in order to support dynamic shares.

That way we can check if an open with the same file_id uses
the correct file name.

BTW: How did you test the dynamic share stuff from a windows client?
Do you have a Win32 programm we can add to testprogs/win32/ ?
If so we could add some rename code to it.


-------------- 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