s3:smbd: map nterror on smb2_flush errorpath
authorAnton Nefedov via samba-technical <samba-technical@lists.samba.org>
Thu, 15 Mar 2018 11:38:41 +0000 (14:38 +0300)
committerJeremy Allison <jra@samba.org>
Fri, 16 Mar 2018 02:04:58 +0000 (03:04 +0100)
smbd_smb2_flush_recv() expects nterror in tevent_req, and otherwise
aborts in tevent_req_is_nterror()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13338

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_flush.c

index d077c62c40345da38cee41dfedda24aa43709f96..51584ca876f059f7e64f51346ccad829fcd4abd4 100644 (file)
@@ -198,7 +198,7 @@ static void smbd_smb2_flush_done(struct tevent_req *subreq)
        ret = SMB_VFS_FSYNC_RECV(subreq, &vfs_aio_state);
        TALLOC_FREE(subreq);
        if (ret == -1) {
-               tevent_req_error(req, vfs_aio_state.error);
+               tevent_req_nterror(req, map_nt_error_from_unix(vfs_aio_state.error));
                return;
        }
        tevent_req_done(req);