linux-user: add fd_trans helper in do_recvfrom()

Fix passwd using netlink audit.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
Laurent Vivier 2016-06-21 19:51:15 +02:00 committed by Riku Voipio
parent 7d61d89232
commit c35e1f9c87
1 changed files with 3 additions and 0 deletions

View File

@ -3316,6 +3316,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)) {