From b596d6a11146c8c9d94733fc64de77da8fd0e547 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Dec 2006 18:55:08 +0000 Subject: r20335: Port oplock return logic from ntcreate&x to NT_TRANSACT_CREATE. Fixes parts of raw-open. Volker (This used to be commit e4e766c092e19f78a593c08f22ea1d7521be18e7) --- source3/smbd/nttrans.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index d4ca1dab0c..9497c5875c 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1482,8 +1482,12 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o p = params; if (extended_oplock_granted) { - SCVAL(p,0, BATCH_OPLOCK_RETURN); - } else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) { + if (flags & REQUEST_BATCH_OPLOCK) { + SCVAL(p,0, BATCH_OPLOCK_RETURN); + } else { + SCVAL(p,0, EXCLUSIVE_OPLOCK_RETURN); + } + } else if (fsp->oplock_type == LEVEL_II_OPLOCK) { SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); } else { SCVAL(p,0,NO_OPLOCK_RETURN); -- cgit