1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Ensure we always write the correct incoming mid into the share mode

table entries.
This commit is contained in:
Jeremy Allison 2011-05-16 10:41:51 -07:00
parent a032c9c8fe
commit fe21bdc43c
2 changed files with 8 additions and 4 deletions

View File

@ -1310,7 +1310,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
new_file_created = True;
}
set_share_mode(lck, fsp, get_current_uid(conn), 0,
set_share_mode(lck, fsp, get_current_uid(conn),
req ? req->mid : 0,
fsp->oplock_type);
/* Handle strange delete on close create semantics. */
@ -1666,7 +1667,8 @@ static NTSTATUS onefs_open_directory(connection_struct *conn,
return NT_STATUS_DELETE_PENDING;
}
set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
set_share_mode(lck, fsp, get_current_uid(conn),
req ? req->mid : 0, NO_OPLOCK);
/*
* For directories the delete on close bit at open time seems

View File

@ -2335,7 +2335,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
new_file_created = True;
}
set_share_mode(lck, fsp, get_current_uid(conn), 0,
set_share_mode(lck, fsp, get_current_uid(conn),
req ? req->mid : 0,
fsp->oplock_type);
/* Handle strange delete on close create semantics. */
@ -2828,7 +2829,8 @@ static NTSTATUS open_directory(connection_struct *conn,
return status;
}
set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
set_share_mode(lck, fsp, get_current_uid(conn),
req ? req->mid : 0, NO_OPLOCK);
/* For directories the delete on close bit at open time seems
always to be honored on close... See test 19 in Samba4 BASE-DELETE. */