From: James Morris <jmorris@namei.org>
To: Venkat Yekkirala <vyekkirala@trustedcs.com>,
"David S. Miller" <davem@davemloft.net>,
Paul Moore <paul.moore@hp.com>
Cc: netdev@vger.kernel.org, selinux@tycho.nsa.gov,
Stephen Smalley <sds@tycho.nsa.gov>,
Eric Paris <eparis@redhat.com>,
johnpol@2ka.mipt.ru, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 1/3] Fix for IPsec leakage with SELinux enabled - V.03
Date: Thu, 5 Oct 2006 16:54:38 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610051651580.25705@d.namei> (raw)
In-Reply-To: <45256E33.8080205@trustedcs.com>
On Thu, 5 Oct 2006, Venkat Yekkirala wrote:
> - if (xfrm_policy_match(pol, fl, type, family, dir)) {
> + err = xfrm_policy_match(pol, fl, type, family, dir);
> + if (err) {
> + if (err == -ESRCH)
> + continue;
> + else {
> + ret = ERR_PTR(err);
> + goto fail;
> + }
> + } else {
Semantics issue: if the exact policy match fails with -EACCESS, should we
then try an inexact match before failing?
> #ifdef CONFIG_XFRM_SUB_POLICY
> pol = xfrm_policy_lookup_bytype(XFRM_POLICY_TYPE_SUB, fl, family, dir);
> - if (pol)
> + if (IS_ERR(pol)) {
> + err = PTR_ERR(pol);
> + pol = NULL;
> + }
> + if (pol || err)
> goto end;
Similarly, if the sub-policy lookup returns -EACCESS, should we then try a
main policy lookup before failing?
I would think yes to both.
Opinions?
- James
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2006-10-05 20:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 20:42 [PATCH 1/3] Fix for IPsec leakage with SELinux enabled - V.03 Venkat Yekkirala
2006-10-05 20:54 ` James Morris [this message]
2006-10-05 21:04 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2006-10-05 21:17 Venkat Yekkirala
2006-10-05 23:30 ` James Morris
2006-10-05 21:27 Venkat Yekkirala
2006-10-05 21:47 ` David Miller
2006-10-05 23:05 ` James Morris
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=Pine.LNX.4.64.0610051651580.25705@d.namei \
--to=jmorris@namei.org \
--cc=davem@davemloft.net \
--cc=eparis@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
--cc=paul.moore@hp.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=vyekkirala@trustedcs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).