diff options
| author | Stefan Schmidt <[email protected]> | 2019-03-19 16:25:37 +0100 |
|---|---|---|
| committer | Stefan Schmidt <[email protected]> | 2019-03-19 16:25:37 +0100 |
| commit | 86008304dc2ad41a274cdacb585c641ec6bbb558 (patch) | |
| tree | 7d8fdd6d9cbba05cebb7d36c4309ea2bb48e0af0 /include/linux/capability.h | |
| parent | 19b39a25388e71390e059906c979f87be4ef0c71 (diff) | |
| parent | ffa91253739ca89fc997195d8bbd1f7ba3e29fbe (diff) | |
Merge remote-tracking branch 'net/master'
Diffstat (limited to 'include/linux/capability.h')
| -rw-r--r-- | include/linux/capability.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index f640dcbc880c..ecce0f43c73a 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -14,7 +14,7 @@ #define _LINUX_CAPABILITY_H #include <uapi/linux/capability.h> - +#include <linux/uidgid.h> #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 @@ -25,11 +25,12 @@ typedef struct kernel_cap_struct { __u32 cap[_KERNEL_CAPABILITY_U32S]; } kernel_cap_t; -/* exact same as vfs_cap_data but in cpu endian and always filled completely */ +/* same as vfs_ns_cap_data but in cpu endian and always filled completely */ struct cpu_vfs_cap_data { __u32 magic_etc; kernel_cap_t permitted; kernel_cap_t inheritable; + kuid_t rootid; }; #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) @@ -209,6 +210,7 @@ extern bool has_ns_capability_noaudit(struct task_struct *t, extern bool capable(int cap); extern bool ns_capable(struct user_namespace *ns, int cap); extern bool ns_capable_noaudit(struct user_namespace *ns, int cap); +extern bool ns_capable_setid(struct user_namespace *ns, int cap); #else static inline bool has_capability(struct task_struct *t, int cap) { @@ -240,6 +242,10 @@ static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap) { return true; } +static inline bool ns_capable_setid(struct user_namespace *ns, int cap) +{ + return true; +} #endif /* CONFIG_MULTIUSER */ extern bool privileged_wrt_inode_uidgid(struct user_namespace *ns, const struct inode *inode); extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); |