public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* Re: [RFC][PATCH 9/11] security: AppArmor - Audit changes
       [not found] ` <20060419175018.29149.391.sendpatchset@ermintrude.int.wirex.com>
@ 2006-04-21 21:21   ` Amy Griffis
  2006-04-22  0:13     ` Steve Grubb
  0 siblings, 1 reply; 3+ messages in thread
From: Amy Griffis @ 2006-04-21 21:21 UTC (permalink / raw)
  To: Tony Jones; +Cc: linux-kernel, chrisw, linux-security-module, linux-audit

Tony Jones wrote:     [Wed Apr 19 2006, 01:50:18PM EDT]
> This patch adds AppArmor support to the audit subsystem.
> 
> It creates id 1500 (already included in the the upstream auditd package) for 
> AppArmor messages.
> 
> It also exports the audit_log_vformat function (analagous to having both
> printk and vprintk exported).

linux-audit (cc'd) will likely want to review these changes.

> 
> Signed-off-by: Tony Jones <tonyj@suse.de>
> 
> ---
>  include/linux/audit.h |    5 +++++
>  kernel/audit.c        |    3 ++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> --- linux-2.6.17-rc1.orig/include/linux/audit.h
> +++ linux-2.6.17-rc1/include/linux/audit.h
> @@ -95,6 +95,8 @@
>  #define AUDIT_LAST_KERN_ANOM_MSG    1799
>  #define AUDIT_ANOM_PROMISCUOUS      1700 /* Device changed promiscuous mode */
>  
> +#define AUDIT_AA		1500	/* AppArmor audit */
> +
>  #define AUDIT_KERNEL		2000	/* Asynchronous audit record. NOT A REQUEST. */
>  
>  /* Rule flags */
> @@ -349,6 +351,9 @@
>  				      __attribute__((format(printf,4,5)));
>  
>  extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
> +extern void		    audit_log_vformat(struct audit_buffer *ab,
> +					      const char *fmt, va_list args)
> +			    __attribute__((format(printf,2,0)));
>  extern void		    audit_log_format(struct audit_buffer *ab,
>  					     const char *fmt, ...)
>  			    __attribute__((format(printf,2,3)));
> --- linux-2.6.17-rc1.orig/kernel/audit.c
> +++ linux-2.6.17-rc1/kernel/audit.c
> @@ -797,7 +797,7 @@
>   * will be called a second time.  Currently, we assume that a printk
>   * can't format message larger than 1024 bytes, so we don't either.
>   */
> -static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
> +void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
>  			      va_list args)
>  {
>  	int len, avail;
> @@ -999,4 +999,5 @@
>  EXPORT_SYMBOL(audit_log_start);
>  EXPORT_SYMBOL(audit_log_end);
>  EXPORT_SYMBOL(audit_log_format);
> +EXPORT_SYMBOL(audit_log_vformat);
>  EXPORT_SYMBOL(audit_log);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][PATCH 9/11] security: AppArmor - Audit changes
  2006-04-21 21:21   ` [RFC][PATCH 9/11] security: AppArmor - Audit changes Amy Griffis
@ 2006-04-22  0:13     ` Steve Grubb
  2006-04-22  0:19       ` Tony Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Grubb @ 2006-04-22  0:13 UTC (permalink / raw)
  To: linux-audit; +Cc: chrisw, linux-security-module, linux-kernel

On Friday 21 April 2006 17:21, Amy Griffis wrote:
> linux-audit (cc'd) will likely want to review these changes.

Yes, I second that. Tony, please cc audit patches to linux-audit mail list so 
we can see them. That said, I did tell Tony they could use message type 
numbers 1500 - 1600 for AppArmor if they need it.

-Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][PATCH 9/11] security: AppArmor - Audit changes
  2006-04-22  0:13     ` Steve Grubb
@ 2006-04-22  0:19       ` Tony Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Jones @ 2006-04-22  0:19 UTC (permalink / raw)
  To: Steve Grubb
  Cc: linux-audit, Amy Griffis, chrisw, linux-security-module,
	linux-kernel

On Fri, Apr 21, 2006 at 08:13:52PM -0400, Steve Grubb wrote:
> On Friday 21 April 2006 17:21, Amy Griffis wrote:
> > linux-audit (cc'd) will likely want to review these changes.
> 
> Yes, I second that. Tony, please cc audit patches to linux-audit mail list so 
> we can see them. That said, I did tell Tony they could use message type 
> numbers 1500 - 1600 for AppArmor if they need it.

Sorry, I thought I'd bounced this one patch in the series to the audit list.
I meant to. One more thing lost in the noise.  Apologies.

1500 should already be reserved for apparmor userside.  Only change is to 
enable it kernelside plus of course the one more symbol export to bloat the 
kernel image.  Export of the vformat call is to make it analagous to vprintk.  
Sometimes it's more convenient to have a single point of logging (as we do)
and you need to log data which is in va_list format.

Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-22  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060419174905.29149.67649.sendpatchset@ermintrude.int.wirex.com>
     [not found] ` <20060419175018.29149.391.sendpatchset@ermintrude.int.wirex.com>
2006-04-21 21:21   ` [RFC][PATCH 9/11] security: AppArmor - Audit changes Amy Griffis
2006-04-22  0:13     ` Steve Grubb
2006-04-22  0:19       ` Tony Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox