public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Joy Latten <latten@austin.ibm.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [PATCH 1/1]: ipsec audit
Date: Wed, 01 Nov 2006 17:10:28 -0600	[thread overview]
Message-ID: <1162422628.17737.298.camel@faith.austin.ibm.com> (raw)
In-Reply-To: <200610301201.30040.sgrubb@redhat.com>

On Mon, 2006-10-30 at 12:01 -0500, Steve Grubb wrote:

> 
> > diff -urpN linux-2.6.18.ppc64/net/xfrm/xfrm_policy.c
> > linux-2.6.18.ppc64.patch/net/xfrm/xfrm_policy.c
> > --- linux-2.6.18.ppc64/net/xfrm/xfrm_policy.c	2006-10-26
> > 03:10:11.000000000 -0500
> > +++ linux-2.6.18.ppc64.patch/net/xfrm/xfrm_policy.c	2006-10-26
> > 07:04:08.000000000 -0500
> > @@ -374,13 +374,21 @@ static void xfrm_policy_gc_task(void *da
> >   * entry dead. The rule must be unlinked from lists to the moment.
> >   */
> >
> > -static void xfrm_policy_kill(struct xfrm_policy *policy)
> > +static void xfrm_policy_kill(struct xfrm_policy *policy, uid_t auid)
> >  {
> >  	int dead;
> >
> >  	write_lock_bh(&policy->lock);
> >  	dead = policy->dead;
> >  	policy->dead = 1;
> > +
> > +	if (policy->security)
> 
> If this is NULL we get no audit message?
> 
> > +		audit_log(current->audit_context, GFP_ATOMIC,
> > +			  AUDIT_MAC_IPSEC_DELSPD,
> > +			  "spd delete: auid=%u 
> 
> subj=  should be after auid field. This means that you need to collect the 
> secid out of the netlink packets and the audit context and send it as well.
> 
Ok, I see how to get the security id from the netlink packet, but how do
I get it from the audit context? I did not see an selinux security id in
audit_context structure...? Am I looking in the wrong place?

> > ctx_alg=%d ctx_doi=%d
> 
> I'd drop the ctx in favor of sp.
> 
ok, but since the algorithm and doi or specific to security lsm/selinux
and not ipsec, would sec_alg, or sec_doi, be better?

> > ctx=%s",  
> > +			  auid, policy->security->ctx_alg,
> > +			  policy->security->ctx_doi, policy->security->ctx_str);
> > +
> 
> Also, the last field should be res=%u. res is the results, 1 meaning success 
> and 0 failure. This means we want this function called on failure, too.
> 
> >  	write_unlock_bh(&policy->lock);

Joy

  reply	other threads:[~2006-11-01 23:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-27  0:23 [PATCH 1/1]: ipsec audit Joy Latten
2006-10-30 17:01 ` Steve Grubb
2006-11-01 23:10   ` Joy Latten [this message]
2006-11-02 22:57     ` Steve Grubb

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=1162422628.17737.298.camel@faith.austin.ibm.com \
    --to=latten@austin.ibm.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.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