aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorHuw Davies <huw@codeweavers.com>2014-04-17 14:02:48 +0100
committerRiku Voipio <riku.voipio@linaro.org>2014-05-02 21:59:28 +0300
commit4bc2975698773afdca2f79ebcff9f3b588f646fc (patch)
treead2ca0c4d0ee385687ac579a313adb67b63245cc /linux-user/syscall.c
parent52b6549442988e0a0819b6b7fb36ded164952a34 (diff)
downloadqemu-4bc2975698773afdca2f79ebcff9f3b588f646fc.zip
qemu-4bc2975698773afdca2f79ebcff9f3b588f646fc.tar.gz
qemu-4bc2975698773afdca2f79ebcff9f3b588f646fc.tar.bz2
linux-user: Add support for SCM_CREDENTIALS.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 52bd000..27073b1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1269,6 +1269,17 @@ static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh,
target_tv->tv_usec = tswapal(tv->tv_usec);
break;
}
+ case SCM_CREDENTIALS:
+ {
+ struct ucred *cred = (struct ucred *)data;
+ struct target_ucred *target_cred =
+ (struct target_ucred *)target_data;
+
+ __put_user(cred->pid, &target_cred->pid);
+ __put_user(cred->uid, &target_cred->uid);
+ __put_user(cred->gid, &target_cred->gid);
+ break;
+ }
default:
goto unimplemented;
}