public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* Re: [PATCH] Replacement of IPC char* context to sid for improved performance
       [not found]   ` <200603310828.13900.sgrubb@redhat.com>
@ 2006-03-31 15:16     ` Dustin Kirkland
  0 siblings, 0 replies; only message in thread
From: Dustin Kirkland @ 2006-03-31 15:16 UTC (permalink / raw)
  To: Steve Grubb; +Cc: Linux Audit Discussion

On Fri, 2006-03-31 at 08:28 -0500, Steve Grubb wrote:
> On Friday 31 March 2006 01:11, Dustin Kirkland wrote:
> > Steve, if you could (a) take a close look at this patch and ensure that
> > I'm closely following your model, and (b) build this patch and run
> > similar performance benchmarks, that would be great.  I'm traveling
> > tomorrow and will be out of pocket for the next few days.
> 
> I needed a patch to do this yesterday and created a patch I was going to send 
> out this morning. It is nearly identical to your patch, but I think you 
> eliminated a function that I missed. I'll reconcile the differences and post 
> a patch in a few minutes.
> 
> The only other item left is to find a test case to performance test with.


Here's a very basic one that I've used.  It only hits one ipc call, but
it does trigger the audit hooks in msgsnd

# gcc -o test_msgget test_msgget.c
# auditctl -a exit,always -S ipc
# tail /var/log/audit/audit.log



#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/errno.h>
#include <sys/stat.h>
#include <stdio.h>

int main() {

	int rc = 0;
	int msgid = 0;
	int mode;

	mode = S_IRWXU;
	if( ( msgid = msgget( IPC_PRIVATE, mode ) ) == -1 ) {
		printf("ERROR: Unable to allocate new message queue: errno=%i\n", errno );
		goto EXIT;
	}

	if( ( rc = msgctl( msgid, IPC_RMID, 0 ) ) == -1 ) {
		printf( "Error removing message queue with ID = [%d]: errno = [%i]\n", msgid, errno );
		goto EXIT;
	}

EXIT:
	return rc;
}






--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-31 15:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1143777716.31922.92.camel@localhost.localdomain>
     [not found] ` <1143785464.6328.18.camel@localhost.localdomain>
     [not found]   ` <200603310828.13900.sgrubb@redhat.com>
2006-03-31 15:16     ` [PATCH] Replacement of IPC char* context to sid for improved performance Dustin Kirkland

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