All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: linux-audit@redhat.com
Cc: viro <viro@zeniv.linux.org.uk>, Miloslav Trmac <mitr@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add SELinux context and TTY name to AUDIT_TTY records
Date: Thu, 19 Mar 2009 16:58:10 -0400	[thread overview]
Message-ID: <200903191658.10530.paul.moore@hp.com> (raw)
In-Reply-To: <273781508.1737621237483080376.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>

On Thursday 19 March 2009 01:18:00 pm Miloslav Trmac wrote:
> From: Miloslav Trmač <mitr@redhat.com>
>
> Add SELinux context information and TTY name (consistent with the
> AUDIT_SYSCALL record) to AUDIT_TTY.  An example record after applying
> this patch:
>
>  type=TTY msg=audit(1237480806.220:22): tty pid=2601 uid=0 auid=500 ses=1
>  subj=unconfined_u:unconfined_r:unconfined_t:s0 major=136 minor=1 tty=pts1
>  comm="bash" data=6361740D
>
> (line wrapped, new fields are "subj" and "tty".)
>
> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> ---
>  drivers/char/tty_audit.c |   57 ++++++++++++++++++++++++-------------
>  1 file changed, 38 insertions(+), 19 deletions(-)

Just a quick procedural comment, in the future you should include patches in 
the body of the email; people will likely ignore your submission otherwise.

There are several audit experts which should review this code but two things 
jumped out at me when glancing at your patch:

 1. SELinux SIDs should not be recorded
 2. From a SELinux/security point of view ttys are considered objects
    and their labels/contexts should be recorded with "obj=" not "subj="

-- 
paul moore
linux @ hp

WARNING: multiple messages have this Message-ID (diff)
From: Paul Moore <paul.moore@hp.com>
To: linux-audit@redhat.com
Cc: Miloslav Trmac <mitr@redhat.com>, viro <viro@zeniv.linux.org.uk>,
	Eric Paris <eparis@redhat.com>,
	"linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add SELinux context and TTY name to AUDIT_TTY records
Date: Thu, 19 Mar 2009 16:58:10 -0400	[thread overview]
Message-ID: <200903191658.10530.paul.moore@hp.com> (raw)
In-Reply-To: <273781508.1737621237483080376.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>

On Thursday 19 March 2009 01:18:00 pm Miloslav Trmac wrote:
> From: Miloslav Trmač <mitr@redhat.com>
>
> Add SELinux context information and TTY name (consistent with the
> AUDIT_SYSCALL record) to AUDIT_TTY.  An example record after applying
> this patch:
>
>  type=TTY msg=audit(1237480806.220:22): tty pid=2601 uid=0 auid=500 ses=1
>  subj=unconfined_u:unconfined_r:unconfined_t:s0 major=136 minor=1 tty=pts1
>  comm="bash" data=6361740D
>
> (line wrapped, new fields are "subj" and "tty".)
>
> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> ---
>  drivers/char/tty_audit.c |   57 ++++++++++++++++++++++++-------------
>  1 file changed, 38 insertions(+), 19 deletions(-)

Just a quick procedural comment, in the future you should include patches in 
the body of the email; people will likely ignore your submission otherwise.

There are several audit experts which should review this code but two things 
jumped out at me when glancing at your patch:

 1. SELinux SIDs should not be recorded
 2. From a SELinux/security point of view ttys are considered objects
    and their labels/contexts should be recorded with "obj=" not "subj="

-- 
paul moore
linux @ hp


  reply	other threads:[~2009-03-19 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <230738142.1737601237483061914.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2009-03-19 17:18 ` [PATCH] Add SELinux context and TTY name to AUDIT_TTY records Miloslav Trmac
2009-03-19 17:18   ` Miloslav Trmac
2009-03-19 20:58   ` Paul Moore [this message]
2009-03-19 20:58     ` Paul Moore
     [not found] <1446383553.1772511237538977759.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2009-03-20  8:53 ` Miloslav Trmac
2009-03-20  8:53   ` Miloslav Trmac
2009-03-20 13:51   ` Paul Moore
2009-03-20 13:51     ` 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=200903191658.10530.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitr@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.