aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2016-06-21 19:51:15 +0200
committerRiku Voipio <riku.voipio@linaro.org>2016-07-19 15:20:59 +0300
commitc35e1f9c87ca57b126cec1bdd56298f63939c420 (patch)
tree203d6dc93806181aa026ea1a767e6c3eede1fa6a /linux-user
parent7d61d892327d803ae43d14500601e48031b4632c (diff)
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>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 491ab55d62..f9ce9d8bb0 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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)) {