summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-09-09 10:53:52 +0000
committerKarolin Seeger <kseeger@samba.org>2014-09-29 21:03:09 +0200
commit05417be9fd0ba9063641e795f4f0541cf32b7c90 (patch)
treea65e14e0173941f0a961f11b13b72fd96083b117 /source3
parent7bbf54d232e7a43833520a3eebda05fcdf8dca27 (diff)
downloadsamba-05417be9fd0ba9063641e795f4f0541cf32b7c90.tar.gz
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 <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 6bb37e9472..4fcdff8c5b 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1109,7 +1109,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;
}
@@ -1332,6 +1332,11 @@ static void find_oplock_types(files_struct *fsp,
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