summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-07 16:54:11 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-09-06 22:17:20 -0700
commit1efdb69b0bb41dec8ee3e2cac0a0f167837d0919 (patch)
treea9eb64c44d773e7b4fead20a7bfa9a354abf3bfa /include
parent9582d90196aa879e6acf866f02a1adead08707b5 (diff)
downloadlinux-1efdb69b0bb41dec8ee3e2cac0a0f167837d0919.tar.gz
linux-1efdb69b0bb41dec8ee3e2cac0a0f167837d0919.tar.bz2
linux-1efdb69b0bb41dec8ee3e2cac0a0f167837d0919.zip
userns: Convert ipc to use kuid and kgid where appropriate
- Store the ipc owner and creator with a kuid - Store the ipc group and the crators group with a kgid. - Add error handling to ipc_update_perms, allowing it to fail if the uids and gids can not be converted to kuids or kgids. - Modify the proc files to display the ipc creator and owner in the user namespace of the opener of the proc file. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipc.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index 30e816148df4..ca833fdc3138 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -79,6 +79,7 @@ struct ipc_kludge {
#ifdef __KERNEL__
#include <linux/spinlock.h>
+#include <linux/uidgid.h>
#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
@@ -89,10 +90,10 @@ struct kern_ipc_perm
int deleted;
int id;
key_t key;
- uid_t uid;
- gid_t gid;
- uid_t cuid;
- gid_t cgid;
+ kuid_t uid;
+ kgid_t gid;
+ kuid_t cuid;
+ kgid_t cgid;
umode_t mode;
unsigned long seq;
void *security;