From patchwork Tue Jun 21 17:51:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 9191181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B6F76075A for ; Tue, 21 Jun 2016 17:55:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9166D281F9 for ; Tue, 21 Jun 2016 17:55:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8615428307; Tue, 21 Jun 2016 17:55:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7B2CC281F9 for ; Tue, 21 Jun 2016 17:55:42 +0000 (UTC) Received: from localhost ([::1]:53455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFPtl-00073y-LN for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jun 2016 13:55:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFPpw-0003RJ-1s for qemu-devel@nongnu.org; Tue, 21 Jun 2016 13:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFPpq-00032y-61 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 13:51:43 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:54383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFPpp-00032s-RZ for qemu-devel@nongnu.org; Tue, 21 Jun 2016 13:51:38 -0400 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MEEDQ-1b8kvY0yoi-00FQBO; Tue, 21 Jun 2016 19:51:28 +0200 From: Laurent Vivier To: Riku Voipio Date: Tue, 21 Jun 2016 19:51:15 +0200 Message-Id: <1466531475-13389-4-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466531475-13389-1-git-send-email-laurent@vivier.eu> References: <1466531475-13389-1-git-send-email-laurent@vivier.eu> X-Provags-ID: V03:K0:v5cgqEWLF6oxn9z8+w/ruTe9sRcpcesph2K+v9nGMvUS24fXi1e VlzBbsl+AK+Zl4uQXeEAecTuLjzBUXe7P5WYqjowi/JzIjGPuItveg7TiB7FJE8NpRylFT2 MhGWUuc1P2Lhbs7vHA8vPYSPZdwXJT3FY75/e5qzAwVwDvqp1nLiwnSWtt/M4361fLYd6kp Y/kG0QbhDH8syCXhkxv1g== X-UI-Out-Filterresults: notjunk:1; V01:K0:9rh/f2NfyYg=:IQ7KLawPV+mRmNirZ4ikva 9Faba2fbaQOjUUZRhmV1ihtU8lhxbiR4llNTUafj90fdIYnBksXtMgEs3JZ63hSWhJcL+iucp DHKnrgu56C3HAS8jgdvriQYjG/k7UB1ghBujy/E8mrKwWwUhjNKED5w38MihVASe+15DgrMWk yY2GAXXIe2/IX3pYh3JYde9F/vlpXnzYz+hoOeFdOLOHZdM+wAKiykKYGbtNtHXDZdDniEtb2 0cMC91q3g4DmX4FrAF0k2euTDZEgbNMjA7E8QR+mhcZcUiG5TP7ulbrlIEAVT6CDNLCHJsZff 9sH1cwp3AZHIOahr+YIg1dH9Uu732M28HoTdDZqzWGMWyHcYJmr6IgV6HVo/NXZHMcDGJa1DQ 6tEjDxJrbMJc/I2KVzUmsro2TAe6znEuriXJP7YvMPVW3J4srDfWGgvcK3jpSKxTu0YoghaUE eEosH+3e+i2Ovo+v9TYk8ZF+djfLyZftqWB9KoboBE+hnQ+GeGnaA+q+GfjmRqV47YJT4dUyl D1fWehp3n9ba8OCfgHKy+/LA1wZKFIcdEgY9mFk444RyhDIzGGTiVgbTpYHwwkgb8wx/M8zdl +3P0ke1gJJ+lZmdSppOg85GFhwdbdC86g0hdu2cdxdSmZeI42q9toPAHibn8WqjrGZQKS0094 fIsTp7IzF9nnakwzIAVBuGS+qIHcieb/Wv3P6MoEIfp0MGvp7TDngql/vUO4JYH6GGWQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.73 Subject: [Qemu-devel] [PATCH 3/3] linux-user: add fd_trans helper in do_recvfrom() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fix passwd using netlink audit. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index fdc884f..125a3fd 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3311,6 +3311,9 @@ static abi_long do_recvfrom(int fd, abi_ulong msg, size_t len, int flags, ret = get_errno(safe_recvfrom(fd, host_msg, len, flags, NULL, 0)); } if (!is_error(ret)) { + if (fd_trans_host_to_target_data(fd)) { + ret = fd_trans_host_to_target_data(fd)(host_msg, ret); + } if (target_addr) { host_to_target_sockaddr(target_addr, addr, addrlen); if (put_user_u32(addrlen, target_addrlen)) {