public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: "Timothy R. Chavez" <tinytim@us.ibm.com>
To: James Antill <jantill@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: close(2) not being audited?
Date: Mon, 29 Jan 2007 14:19:31 -0600	[thread overview]
Message-ID: <20070129141931.75da4731@crumpet> (raw)
In-Reply-To: <1170020456.26475.6.camel@code.and.org>

On Sun, 28 Jan 2007 16:40:56 -0500
James Antill <jantill@redhat.com> wrote:

> On Fri, 2007-01-26 at 17:46 -0600, Timothy R. Chavez wrote:
> 
> > Yep, I was referring to last reference to opened file.
> > 
> > I'd hate to suggest adding a field to the file like "opened_as" which would
> > store the original fd it was assigned, but that would be enough to associate
> > the open() record and the final "close" record.
> 
> 
> fd1 = open(...);
> ptr1 = mmap(fd1, ...);
> close(fd1);
> 
> fd2 = open(...);
> assert(fd1 == fd2);
> ptr2 = mmap(fd2, ...);
> close(fd2);
> 
> munmap(ptr1, ...);
> munmap(ptr2, ...);
> 
> ...what should appear in the logs here? How are you going to tell which
> fd each munmap() belongs to?
>  Maybe you mean "log inode/device for the file" and not "original fd",
> and then if/when you get confused it doesn't matter?
> 

Well yes, I was assuming you would have the additional context provided by other
fields in the record such as inode and device, but on second thought, I think you
are right that such information should be sufficient to tie the "close" record with
the open() record without needing to correlate an fd between the two (which, like
you suggest, would be ambiguous without the additional context, anyway).

-tim

  reply	other threads:[~2007-01-29 20:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-28 21:58 close(2) not being audited? Todd, Charles
2006-12-30 14:36 ` Steve Grubb
2007-01-26 17:37 ` Steve Grubb
2007-01-26 18:03   ` John D. Ramsdell
2007-01-26 20:14   ` Wieprecht, Karen M.
2007-01-26 22:19     ` Alexander Viro
2007-01-26 23:00       ` Timothy R. Chavez
2007-01-26 23:01       ` Timothy R. Chavez
2007-01-26 23:20         ` Alexander Viro
2007-01-26 23:46           ` Timothy R. Chavez
2007-01-28 21:40             ` James Antill
2007-01-29 20:19               ` Timothy R. Chavez [this message]
2007-01-26 23:29         ` Alexander Viro
2007-01-27  0:03           ` Timothy R. Chavez

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=20070129141931.75da4731@crumpet \
    --to=tinytim@us.ibm.com \
    --cc=jantill@redhat.com \
    --cc=linux-audit@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