diff options
Diffstat (limited to 'source3/smbd/oplock.c')
-rw-r--r-- | source3/smbd/oplock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index f6c97c3df4..54e7da11af 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -398,8 +398,10 @@ static void process_oplock_break_message(int msg_type, struct process_id src, * get to process this message, we have closed the file. Reply * with 'ok, oplock broken' */ DEBUG(3, ("Did not find fsp\n")); + become_root(); message_send_pid(src, MSG_SMB_BREAK_RESPONSE, msg, sizeof(*msg), True); + unbecome_root(); return; } @@ -418,8 +420,10 @@ static void process_oplock_break_message(int msg_type, struct process_id src, DEBUG(3, ("Already downgraded oplock on %.0f/%.0f: %s\n", (double)fsp->dev, (double)fsp->inode, fsp->fsp_name)); + become_root(); message_send_pid(src, MSG_SMB_BREAK_RESPONSE, msg, sizeof(*msg), True); + unbecome_root(); return; } @@ -545,11 +549,13 @@ void reply_to_oplock_break_requests(files_struct *fsp) { int i; + become_root(); for (i=0; i<fsp->num_pending_break_messages; i++) { struct share_mode_entry *msg = &fsp->pending_break_messages[i]; message_send_pid(msg->pid, MSG_SMB_BREAK_RESPONSE, msg, sizeof(*msg), True); } + unbecome_root(); SAFE_FREE(fsp->pending_break_messages); fsp->num_pending_break_messages = 0; @@ -686,8 +692,10 @@ void release_level_2_oplocks_on_change(files_struct *fsp) abort(); } + become_root(); message_send_pid(share_entry->pid, MSG_SMB_ASYNC_LEVEL2_BREAK, share_entry, sizeof(*share_entry), True); + unbecome_root(); } remove_all_share_oplocks(lck, fsp); |