diff options
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/array.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index d7f9199217bb..cd3653e4f35c 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -297,15 +297,11 @@ static void render_cap_t(struct seq_file *m, const char *header, | |||
297 | seq_puts(m, header); | 297 | seq_puts(m, header); |
298 | CAP_FOR_EACH_U32(__capi) { | 298 | CAP_FOR_EACH_U32(__capi) { |
299 | seq_printf(m, "%08x", | 299 | seq_printf(m, "%08x", |
300 | a->cap[(_KERNEL_CAPABILITY_U32S-1) - __capi]); | 300 | a->cap[CAP_LAST_U32 - __capi]); |
301 | } | 301 | } |
302 | seq_putc(m, '\n'); | 302 | seq_putc(m, '\n'); |
303 | } | 303 | } |
304 | 304 | ||
305 | /* Remove non-existent capabilities */ | ||
306 | #define NORM_CAPS(v) (v.cap[CAP_TO_INDEX(CAP_LAST_CAP)] &= \ | ||
307 | CAP_TO_MASK(CAP_LAST_CAP + 1) - 1) | ||
308 | |||
309 | static inline void task_cap(struct seq_file *m, struct task_struct *p) | 305 | static inline void task_cap(struct seq_file *m, struct task_struct *p) |
310 | { | 306 | { |
311 | const struct cred *cred; | 307 | const struct cred *cred; |
@@ -319,11 +315,6 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p) | |||
319 | cap_bset = cred->cap_bset; | 315 | cap_bset = cred->cap_bset; |
320 | rcu_read_unlock(); | 316 | rcu_read_unlock(); |
321 | 317 | ||
322 | NORM_CAPS(cap_inheritable); | ||
323 | NORM_CAPS(cap_permitted); | ||
324 | NORM_CAPS(cap_effective); | ||
325 | NORM_CAPS(cap_bset); | ||
326 | |||
327 | render_cap_t(m, "CapInh:\t", &cap_inheritable); | 318 | render_cap_t(m, "CapInh:\t", &cap_inheritable); |
328 | render_cap_t(m, "CapPrm:\t", &cap_permitted); | 319 | render_cap_t(m, "CapPrm:\t", &cap_permitted); |
329 | render_cap_t(m, "CapEff:\t", &cap_effective); | 320 | render_cap_t(m, "CapEff:\t", &cap_effective); |