All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: zhangxiliang <zhangxiliang@cn.fujitsu.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	viro@zeniv.linux.org.uk, Linux Audit <linux-audit@redhat.com>
Subject: Re: [PATCH] the loginuid field should be output in all AUDIT_CONFIG_CHANGE audit messages
Date: Thu, 31 Jul 2008 13:42:02 -0400	[thread overview]
Message-ID: <1217526122.2902.103.camel@localhost.localdomain> (raw)
In-Reply-To: <488FE2B9.2040101@cn.fujitsu.com>

On Wed, 2008-07-30 at 11:40 +0800, zhangxiliang wrote:
> In the audit message which type is "AUDIT_CONFIG_CHANGE", the output format should contain "auid" field.

shouldn't these be using the "audit_get_loginuid(current)"  and if we
are going to output loginuid we also should be outputting sessionid

-Eric

> 
> Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
> ---
>  kernel/auditfilter.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index 98c50cc..8a184f5 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -1022,8 +1022,9 @@ static void audit_update_watch(struct audit_parent *parent,
>  			struct audit_buffer *ab;
>  			ab = audit_log_start(NULL, GFP_KERNEL,
>  				AUDIT_CONFIG_CHANGE);
> +			audit_log_format(ab, "auid=%u", current->loginuid);
>  			audit_log_format(ab,
> -				"op=updated rules specifying path=");
> +				" op=updated rules specifying path=");
>  			audit_log_untrustedstring(ab, owatch->path);
>  			audit_log_format(ab, " with dev=%u ino=%lu\n",
>  				 dev, ino);
> @@ -1058,7 +1059,8 @@ static void audit_remove_parent_watches(struct audit_parent *parent)
>  				struct audit_buffer *ab;
>  				ab = audit_log_start(NULL, GFP_KERNEL,
>  					AUDIT_CONFIG_CHANGE);
> -				audit_log_format(ab, "op=remove rule path=");
> +				audit_log_format(ab, "auid=%u", current->loginuid);
> +				audit_log_format(ab, " op=remove rule path=");
>  				audit_log_untrustedstring(ab, w->path);
>  				if (r->filterkey) {
>  					audit_log_format(ab, " key=");
> -- 
> 1.5.4.2
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Eric Paris <eparis@redhat.com>
To: zhangxiliang <zhangxiliang@cn.fujitsu.com>
Cc: sgrubb@redhat.com, viro@zeniv.linux.org.uk,
	Linux Audit <linux-audit@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] the loginuid field should be output in all AUDIT_CONFIG_CHANGE audit messages
Date: Thu, 31 Jul 2008 13:42:02 -0400	[thread overview]
Message-ID: <1217526122.2902.103.camel@localhost.localdomain> (raw)
In-Reply-To: <488FE2B9.2040101@cn.fujitsu.com>

On Wed, 2008-07-30 at 11:40 +0800, zhangxiliang wrote:
> In the audit message which type is "AUDIT_CONFIG_CHANGE", the output format should contain "auid" field.

shouldn't these be using the "audit_get_loginuid(current)"  and if we
are going to output loginuid we also should be outputting sessionid

-Eric

> 
> Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
> ---
>  kernel/auditfilter.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index 98c50cc..8a184f5 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -1022,8 +1022,9 @@ static void audit_update_watch(struct audit_parent *parent,
>  			struct audit_buffer *ab;
>  			ab = audit_log_start(NULL, GFP_KERNEL,
>  				AUDIT_CONFIG_CHANGE);
> +			audit_log_format(ab, "auid=%u", current->loginuid);
>  			audit_log_format(ab,
> -				"op=updated rules specifying path=");
> +				" op=updated rules specifying path=");
>  			audit_log_untrustedstring(ab, owatch->path);
>  			audit_log_format(ab, " with dev=%u ino=%lu\n",
>  				 dev, ino);
> @@ -1058,7 +1059,8 @@ static void audit_remove_parent_watches(struct audit_parent *parent)
>  				struct audit_buffer *ab;
>  				ab = audit_log_start(NULL, GFP_KERNEL,
>  					AUDIT_CONFIG_CHANGE);
> -				audit_log_format(ab, "op=remove rule path=");
> +				audit_log_format(ab, "auid=%u", current->loginuid);
> +				audit_log_format(ab, " op=remove rule path=");
>  				audit_log_untrustedstring(ab, w->path);
>  				if (r->filterkey) {
>  					audit_log_format(ab, " key=");
> -- 
> 1.5.4.2
> 
> 


  reply	other threads:[~2008-07-31 17:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30  3:40 [PATCH] the loginuid field should be output in all AUDIT_CONFIG_CHANGE audit messages zhangxiliang
2008-07-31 17:42 ` Eric Paris [this message]
2008-07-31 17:42   ` Eric Paris
2008-08-01  1:47   ` zhangxiliang

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=1217526122.2902.103.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zhangxiliang@cn.fujitsu.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.