From 9e36d6bbc75cd2a2c4e5b3ed93c3ebb7a7368ffc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 9 Sep 2014 10:53:52 +0000 Subject: [PATCH] s3: smbd: streams - Ensure share mode validation ignores internal opens (op_mid == 0). Fixes bug 10797 - smbd panic at find_oplock_types https://bugzilla.samba.org/show_bug.cgi?id=10797 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/open.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 6261a449..f2abc55 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1110,7 +1110,7 @@ static void validate_my_share_entries(struct smbd_server_connection *sconn, return; } - if (share_entry->share_file_id == 0) { + if (share_entry->op_mid == 0) { /* INTERNAL_OPEN_ONLY */ return; } @@ -1291,6 +1291,11 @@ static bool validate_oplock_types(struct share_mode_lock *lck) continue; } + if (e->op_mid == 0) { + /* INTERNAL_OPEN_ONLY */ + continue; + } + if (e->op_type == NO_OPLOCK && is_stat_open(e->access_mask)) { /* We ignore stat opens in the table - they always have NO_OPLOCK and never get or -- 2.1.0.rc2.206.gedb03e5