diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-07 19:54:11 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-07 01:17:20 -0400 |
commit | 1efdb69b0bb41dec8ee3e2cac0a0f167837d0919 (patch) | |
tree | a9eb64c44d773e7b4fead20a7bfa9a354abf3bfa /include/linux/ipc.h | |
parent | 9582d90196aa879e6acf866f02a1adead08707b5 (diff) |
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/linux/ipc.h')
-rw-r--r-- | include/linux/ipc.h | 9 |
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 { | |||
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
81 | #include <linux/spinlock.h> | 81 | #include <linux/spinlock.h> |
82 | #include <linux/uidgid.h> | ||
82 | 83 | ||
83 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ | 84 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ |
84 | 85 | ||
@@ -89,10 +90,10 @@ struct kern_ipc_perm | |||
89 | int deleted; | 90 | int deleted; |
90 | int id; | 91 | int id; |
91 | key_t key; | 92 | key_t key; |
92 | uid_t uid; | 93 | kuid_t uid; |
93 | gid_t gid; | 94 | kgid_t gid; |
94 | uid_t cuid; | 95 | kuid_t cuid; |
95 | gid_t cgid; | 96 | kgid_t cgid; |
96 | umode_t mode; | 97 | umode_t mode; |
97 | unsigned long seq; | 98 | unsigned long seq; |
98 | void *security; | 99 | void *security; |