s3: smbd: Fix open_files.idl to correctly ignore share_mode_lease *lease in share_mod...
authorJeremy Allison <jra@samba.org>
Tue, 16 May 2017 23:12:19 +0000 (16:12 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 18 May 2017 01:01:40 +0000 (03:01 +0200)
This is currently marked 'skip', which means it isn't stored in the
db, but printed out in ndr dump. However, this pointer can be invalid
if the lease_idx is set to 0xFFFFFFFF (invalid).

This is fixed up inside parse_share_modes(), but not until after
ndr_pull_share_mode_data() is called. If lease_idx == 0xFFFFFFFF
then ndr_print_share_mode_lease() prints an invalid value and
crashes.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12793

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 18 03:01:40 CEST 2017 on sn-devel-144

source3/librpc/idl/open_files.idl
source3/locking/share_mode_lock.c

index 6f74340497b1d4b04c1febef5c1a12d7f5dc78b2..1f85f245fca0a045fde51848b3b315fa534fcc1c 100644 (file)
@@ -62,7 +62,7 @@ interface open_files
                 * to store this share_mode_entry on disk.
                 */
                [skip] boolean8 stale;
-               [skip] share_mode_lease *lease;
+               [ignore] share_mode_lease *lease;
        } share_mode_entry;
 
        typedef [public] struct {
index 0333b0d79659813cc52f18963c6353a8b8c12edd..cee00458079b86bc76a37aa011955b4276521547 100644 (file)
@@ -324,8 +324,8 @@ static struct share_mode_data *parse_share_modes(TALLOC_CTX *mem_ctx,
        }
 
        /*
-        * Initialize the values that are [skip] in the idl. The NDR code does
-        * not initialize them.
+        * Initialize the values that are [skip] or [ignore]
+        * in the idl. The NDR code does not initialize them.
         */
 
        for (i=0; i<d->num_share_modes; i++) {