diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-08 04:47:26 +0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-14 01:32:24 +0400 |
commit | 5fce5e0bbd44263c36f58ad1113b599d06ed1978 (patch) | |
tree | 1864cb5740d44f1e16d373e69fca5eb54e449213 /drivers/gpu/drm/drm_ioctl.c | |
parent | 1efdb69b0bb41dec8ee3e2cac0a0f167837d0919 (diff) | |
download | linux-5fce5e0bbd44263c36f58ad1113b599d06ed1978.tar.xz |
userns: Convert drm to use kuid and kgid and struct pid where appropriate
Blink Blink this had not been converted to use struct pid ages ago?
- On drm open capture the openers kuid and struct pid.
- On drm close release the kuid and struct pid
- When reporting the uid and pid convert the kuid and struct pid
into values in the appropriate namespace.
Cc: dri-devel@lists.freedesktop.org
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 64a62c697313..39a43834cef9 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -215,8 +215,8 @@ int drm_getclient(struct drm_device *dev, void *data, list_for_each_entry(pt, &dev->filelist, lhead) { if (i++ >= idx) { client->auth = pt->authenticated; - client->pid = pt->pid; - client->uid = pt->uid; + client->pid = pid_vnr(pt->pid); + client->uid = from_kuid_munged(current_user_ns(), pt->uid); client->magic = pt->magic; client->iocs = pt->ioctl_count; mutex_unlock(&dev->struct_mutex); |