From: Paul Moore <paul.moore@hp.com>
To: Eric Paris <eparis@redhat.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org, sds@tycho.nsa.gov,
jmorris@nameil.org, morgan@kernel.org, casey@schaufler-ca.com,
esandeen@redhat.com
Subject: Re: [PATCH -v1 1/3] SECURITY: new capable_noaudit interface
Date: Thu, 30 Oct 2008 12:46:20 -0400 [thread overview]
Message-ID: <200810301246.20328.paul.moore@hp.com> (raw)
In-Reply-To: <20081030152940.GA24853@us.ibm.com>
On Thursday 30 October 2008 11:29:40 am Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@redhat.com):
> > Add a new capable interface that will be used by systems that use
> > audit to make an A or B type decision instead of a security
> > decision. Currently this is the case at least for filesystems when
> > deciding if a process can use the reserved 'root' blocks and for
> > the case of things like the oom algorithm determining if processes
> > are root processes and should be less likely to be killed. These
> > types of security system requests should not be audited or logged
> > since they are not really security decisions. It would be possible
> > to solve this problem like the vm_enough_memory security check did
> > by creating a new LSM interface and moving all of the policy into
> > that interface but proves the needlessly bloat the LSM and provide
> > complex indirection.
> >
> > This merely allows those decisions to be made where they belong and
> > to not flood logs or printk with denials for thing that are not
> > security decisions.
> >
> > Signed-off-by: Eric Paris <eparis@redhat.com>
>
> Please introduce some meaningful defines instead of passing 0 and 1.
> I.e.
>
> #define CAP_NOAUDIT 0
> #define CAP_AUDIT 1
>
> Otherwise, looks fine.
As a general rule aren't boolean arguments like this frowned upon, with
variations on the function preferred, i.e. something like below?
int cap_capable(struct task_struct *tsk, int cap);
int cap_capable_audit(struct task_struct *tsk, int cap);
--
paul moore
linux @ hp
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
WARNING: multiple messages have this Message-ID (diff)
From: Paul Moore <paul.moore@hp.com>
To: Eric Paris <eparis@redhat.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org, sds@tycho.nsa.gov,
jmorris@nameil.org, morgan@kernel.org, casey@schaufler-ca.com,
esandeen@redhat.com
Subject: Re: [PATCH -v1 1/3] SECURITY: new capable_noaudit interface
Date: Thu, 30 Oct 2008 12:46:20 -0400 [thread overview]
Message-ID: <200810301246.20328.paul.moore@hp.com> (raw)
In-Reply-To: <20081030152940.GA24853@us.ibm.com>
On Thursday 30 October 2008 11:29:40 am Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@redhat.com):
> > Add a new capable interface that will be used by systems that use
> > audit to make an A or B type decision instead of a security
> > decision. Currently this is the case at least for filesystems when
> > deciding if a process can use the reserved 'root' blocks and for
> > the case of things like the oom algorithm determining if processes
> > are root processes and should be less likely to be killed. These
> > types of security system requests should not be audited or logged
> > since they are not really security decisions. It would be possible
> > to solve this problem like the vm_enough_memory security check did
> > by creating a new LSM interface and moving all of the policy into
> > that interface but proves the needlessly bloat the LSM and provide
> > complex indirection.
> >
> > This merely allows those decisions to be made where they belong and
> > to not flood logs or printk with denials for thing that are not
> > security decisions.
> >
> > Signed-off-by: Eric Paris <eparis@redhat.com>
>
> Please introduce some meaningful defines instead of passing 0 and 1.
> I.e.
>
> #define CAP_NOAUDIT 0
> #define CAP_AUDIT 1
>
> Otherwise, looks fine.
As a general rule aren't boolean arguments like this frowned upon, with
variations on the function preferred, i.e. something like below?
int cap_capable(struct task_struct *tsk, int cap);
int cap_capable_audit(struct task_struct *tsk, int cap);
--
paul moore
linux @ hp
next prev parent reply other threads:[~2008-10-30 16:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 19:06 [PATCH -v1 1/3] SECURITY: new capable_noaudit interface Eric Paris
2008-10-29 19:06 ` Eric Paris
2008-10-29 19:06 ` [PATCH -v1 2/3] vm: use new has_capability_noaudit Eric Paris
2008-10-29 19:06 ` Eric Paris
2008-10-29 19:15 ` Stephen Smalley
2008-10-29 19:15 ` Stephen Smalley
2008-10-29 19:57 ` Eric Paris
2008-10-29 19:57 ` Eric Paris
2008-10-29 19:07 ` [PATCH -v1 3/3] filesystems: use has_capability_noaudit interface for reserved blocks checks Eric Paris
2008-10-29 19:07 ` Eric Paris
2008-10-30 15:29 ` [PATCH -v1 1/3] SECURITY: new capable_noaudit interface Serge E. Hallyn
2008-10-30 15:29 ` Serge E. Hallyn
2008-10-30 16:46 ` Paul Moore [this message]
2008-10-30 16:46 ` Paul Moore
2008-10-30 17:17 ` Eric Paris
2008-10-30 17:17 ` Eric Paris
2008-10-30 17:29 ` Paul Moore
2008-10-30 17:29 ` Paul Moore
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=200810301246.20328.paul.moore@hp.com \
--to=paul.moore@hp.com \
--cc=casey@schaufler-ca.com \
--cc=eparis@redhat.com \
--cc=esandeen@redhat.com \
--cc=jmorris@nameil.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serue@us.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.