s3: smbd: Fix open_files.idl to correctly ignore share_mode_lease *lease in share_mod...
commit4de3ddc572ba119e9414f8ae6547dd14a574e56f
authorJeremy Allison <jra@samba.org>
Tue, 16 May 2017 23:12:19 +0000 (16 16:12 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 19 May 2017 11:33:08 +0000 (19 13:33 +0200)
treecc9f31891b572d3ff4aeb6c0347b218d355d49e1
parentf71fecac77c4d8922ebb4771b8430bcb90e4f100
s3: smbd: Fix open_files.idl to correctly ignore share_mode_lease *lease in share_mode_entry.

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

(cherry picked from commit b691f6d32f79ef8427f567612243dd51ea8d5584)

Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Fri May 19 13:33:08 CEST 2017 on sn-devel-144
source3/librpc/idl/open_files.idl
source3/locking/share_mode_lock.c