]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: avoid explicit change_to_user() in defer_rename_done() already done by imperson...
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Jun 2018 17:20:53 +0000 (19:20 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Jul 2018 12:25:18 +0000 (14:25 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_setinfo.c

index 5a6a28a323e25f207a7051d25243695621a7eba7..1f07b7e11900c5e4fcd7be9d0b7af2efc104ca46 100644 (file)
@@ -281,7 +281,6 @@ static void defer_rename_done(struct tevent_req *subreq)
        NTSTATUS status;
        struct share_mode_lock *lck;
        int ret_size = 0;
-       bool ok;
 
        status = dbwrap_watched_watch_recv(subreq, NULL, NULL);
        TALLOC_FREE(subreq);
@@ -292,16 +291,6 @@ static void defer_rename_done(struct tevent_req *subreq)
                return;
        }
 
-       /*
-        * Make sure we run as the user again
-        */
-       ok = change_to_user(state->smb2req->tcon->compat,
-                           state->smb2req->session->compat->vuid);
-       if (!ok) {
-               tevent_req_nterror(state->req, NT_STATUS_ACCESS_DENIED);
-               return;
-       }
-
        /* Do we still need to wait ? */
        lck = get_existing_share_mode_lock(state->req, state->fsp->file_id);
        if (lck == NULL) {