diff mbox

[3/3] linux-user: add fd_trans helper in do_recvfrom()

Message ID 1466531475-13389-4-git-send-email-laurent@vivier.eu
State New
Headers show

Commit Message

Laurent Vivier June 21, 2016, 5:51 p.m. UTC
Fix passwd using netlink audit.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

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)) {