mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] capabilities: add bounding set to /proc/self/status
@ 2008-05-01 18:35 Serge E. Hallyn
  2008-05-02  0:34 ` Andrew G. Morgan
  2008-05-02  0:38 ` Chris Wright
  0 siblings, 2 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2008-05-01 18:35 UTC (permalink / raw)
  To: lkml; +Cc: Andrew Morgan, linux-security-module, Michael Kerrisk

There is currently no way to query the bounding set of another
task.  As there appears to be no security reason not to, and
as Michael Kerrisk points out the following valid reasons to do
so exist:

* consistency (I can see all of the other per-thread/process sets in
/proc/.../status)
* debugging -- I could imagine that it would make the job of debugging
an application that uses capabilities a little simpler.

this patch adds the bounding set to /proc/self/status right after
the effective set.

If at all possible (and if acked by Andrew Morgan) it would be nice to
get this into the 2.6.26 cycle.  But I realize it probably is too late
for that.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
---
 fs/proc/array.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/proc/array.c b/fs/proc/array.c
index c135cbd..160dd4a 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -297,6 +297,7 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p)
 	render_cap_t(m, "CapInh:\t", &p->cap_inheritable);
 	render_cap_t(m, "CapPrm:\t", &p->cap_permitted);
 	render_cap_t(m, "CapEff:\t", &p->cap_effective);
+	render_cap_t(m, "CapBnd:\t", &p->cap_bset);
 }
 
 static inline void task_context_switch_counts(struct seq_file *m,
-- 
1.5.3.6


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-05 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-01 18:35 [PATCH] capabilities: add bounding set to /proc/self/status Serge E. Hallyn
2008-05-02  0:34 ` Andrew G. Morgan
2008-05-02  0:38 ` Chris Wright
2008-05-05  8:22   ` Michael Kerrisk
2008-05-05 15:52     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome