mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	James Morris <jmorris@namei.org>,
	chris friedhoff <chris@friedhoff.org>,
	Chris Wright <chrisw@sous-sol.org>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/1] security: introduce file posix caps
Date: Tue, 7 Nov 2006 10:43:08 -0600	[thread overview]
Message-ID: <20061107164308.GC18660@sergelap.austin.ibm.com> (raw)
In-Reply-To: <1162913217.3009.38.camel@moss-spartans.epoch.ncsc.mil>

Quoting Stephen Smalley (sds@tycho.nsa.gov):
> On Tue, 2006-11-07 at 09:10 -0600, Serge E. Hallyn wrote:
> > Quoting Stephen Smalley (sds@tycho.nsa.gov):
> > > On Mon, 2006-11-06 at 21:45 -0600, Serge E. Hallyn wrote:
> > > > Implement file posix capabilities.  This allows programs to be given
> > > > a subset of root's powers regardless of who runs them, without
> > > > having to use setuid and giving the binary all of root's powers.
> > > 
> > > > diff --git a/include/linux/security.h b/include/linux/security.h
> > > > index b200b98..ea631ee 100644
> > > > --- a/include/linux/security.h
> > > > +++ b/include/linux/security.h
> > > > @@ -53,6 +53,10 @@ extern int cap_inode_setxattr(struct den
> > > >  extern int cap_inode_removexattr(struct dentry *dentry, char *name);
> > > >  extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
> > > >  extern void cap_task_reparent_to_init (struct task_struct *p);
> > > > +extern int cap_task_kill(struct task_struct *p, struct siginfo *info, int sig, u32 secid);
> > > > +extern int cap_task_setscheduler (struct task_struct *p, int policy, struct sched_param *lp);
> > > > +extern int cap_task_setioprio (struct task_struct *p, int ioprio);
> > > > +extern int cap_task_setnice (struct task_struct *p, int nice);
> > > >  extern int cap_syslog (int type);
> > > >  extern int cap_vm_enough_memory (long pages);
> > > >  
> > > > @@ -2594,12 +2598,12 @@ static inline int security_task_setgroup
> > > >  
> > > >  static inline int security_task_setnice (struct task_struct *p, int nice)
> > > >  {
> > > > -	return 0;
> > > > +	return cap_task_setnice(p, nice);
> > > >  }
> > > >  
> > > >  static inline int security_task_setioprio (struct task_struct *p, int ioprio)
> > > >  {
> > > > -	return 0;
> > > > +	return cap_task_setioprio(p, ioprio);
> > > >  }
> > > >  
> > > >  static inline int security_task_getioprio (struct task_struct *p)
> > > 
> > > setscheduler change seems to be missing here.
> > 
> > I'm confused - my kernel version already had selinux_task_setscheduler()
> > calling a secondary_ops->task_setscheduler().
> 
> I meant you didn't change the default implementation of
> security_task_setscheduler() to call cap_task_setscheduler() in
> security.h.  For the case where CONFIG_SECURITY is not defined.

Oh, I thought my git tree had gotten messed up.

So I guess that CONFIG_SECURITY_FS_CAPABILITIES should not be dependent
on CONFIG_SECURITY_CAPABILITIES, since the !CONFIG_SECURITY case
actually enables capabilities?

-serge

  reply	other threads:[~2006-11-07 16:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-07  3:45 Serge E. Hallyn
2006-11-07 12:27 ` KaiGai Kohei
2006-11-07 14:56 ` Stephen Smalley
2006-11-07 15:10   ` Serge E. Hallyn
2006-11-07 15:26     ` Stephen Smalley
2006-11-07 16:43       ` Serge E. Hallyn [this message]
2006-11-07 18:45       ` Serge E. Hallyn
2006-11-07 21:54 ` Seth Arnold
2006-11-07 22:06   ` Serge E. Hallyn
2006-11-08  5:32   ` Serge E. Hallyn
2006-11-08 18:50     ` Chris Friedhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061107164308.GC18660@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=chris@friedhoff.org \
    --cc=chrisw@sous-sol.org \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®