diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:39:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:39:15 -0400 |
commit | eea3a00264cf243a28e4331566ce67b86059339d (patch) | |
tree | 487f16389e0dfa32e9caa7604d1274a7dcda8f04 /include/linux/capability.h | |
parent | e7c82412433a8039616c7314533a0a1c025d99bf (diff) | |
parent | e693d73c20ffdb06840c9378f367bad849ac0d5d (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge second patchbomb from Andrew Morton:
- the rest of MM
- various misc bits
- add ability to run /sbin/reboot at reboot time
- printk/vsprintf changes
- fiddle with seq_printf() return value
* akpm: (114 commits)
parisc: remove use of seq_printf return value
lru_cache: remove use of seq_printf return value
tracing: remove use of seq_printf return value
cgroup: remove use of seq_printf return value
proc: remove use of seq_printf return value
s390: remove use of seq_printf return value
cris fasttimer: remove use of seq_printf return value
cris: remove use of seq_printf return value
openrisc: remove use of seq_printf return value
ARM: plat-pxa: remove use of seq_printf return value
nios2: cpuinfo: remove use of seq_printf return value
microblaze: mb: remove use of seq_printf return value
ipc: remove use of seq_printf return value
rtc: remove use of seq_printf return value
power: wakeup: remove use of seq_printf return value
x86: mtrr: if: remove use of seq_printf return value
linux/bitmap.h: improve BITMAP_{LAST,FIRST}_WORD_MASK
MAINTAINERS: CREDITS: remove Stefano Brivio from B43
.mailmap: add Ricardo Ribalda
CREDITS: add Ricardo Ribalda Delgado
...
Diffstat (limited to 'include/linux/capability.h')
-rw-r--r-- | include/linux/capability.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index aa93e5ef594c..af9f0b9e80e6 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -205,6 +205,7 @@ static inline kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a, | |||
205 | cap_intersect(permitted, __cap_nfsd_set)); | 205 | cap_intersect(permitted, __cap_nfsd_set)); |
206 | } | 206 | } |
207 | 207 | ||
208 | #ifdef CONFIG_MULTIUSER | ||
208 | extern bool has_capability(struct task_struct *t, int cap); | 209 | extern bool has_capability(struct task_struct *t, int cap); |
209 | extern bool has_ns_capability(struct task_struct *t, | 210 | extern bool has_ns_capability(struct task_struct *t, |
210 | struct user_namespace *ns, int cap); | 211 | struct user_namespace *ns, int cap); |
@@ -213,6 +214,34 @@ extern bool has_ns_capability_noaudit(struct task_struct *t, | |||
213 | struct user_namespace *ns, int cap); | 214 | struct user_namespace *ns, int cap); |
214 | extern bool capable(int cap); | 215 | extern bool capable(int cap); |
215 | extern bool ns_capable(struct user_namespace *ns, int cap); | 216 | extern bool ns_capable(struct user_namespace *ns, int cap); |
217 | #else | ||
218 | static inline bool has_capability(struct task_struct *t, int cap) | ||
219 | { | ||
220 | return true; | ||
221 | } | ||
222 | static inline bool has_ns_capability(struct task_struct *t, | ||
223 | struct user_namespace *ns, int cap) | ||
224 | { | ||
225 | return true; | ||
226 | } | ||
227 | static inline bool has_capability_noaudit(struct task_struct *t, int cap) | ||
228 | { | ||
229 | return true; | ||
230 | } | ||
231 | static inline bool has_ns_capability_noaudit(struct task_struct *t, | ||
232 | struct user_namespace *ns, int cap) | ||
233 | { | ||
234 | return true; | ||
235 | } | ||
236 | static inline bool capable(int cap) | ||
237 | { | ||
238 | return true; | ||
239 | } | ||
240 | static inline bool ns_capable(struct user_namespace *ns, int cap) | ||
241 | { | ||
242 | return true; | ||
243 | } | ||
244 | #endif /* CONFIG_MULTIUSER */ | ||
216 | extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); | 245 | extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); |
217 | extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); | 246 | extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); |
218 | 247 | ||