Date: Tue, 14 Jul 2009 19:48:44 GMT From: Ilias Marinos <marinosi@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166100 for review Message-ID: <200907141948.n6EJmixE035020@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166100 Change 166100 by marinosi@marinosi_redrum on 2009/07/14 19:48:28 Fixed some bugs. Affected files ... .. //depot/projects/soc2009/marinosi_appaudit/src/sys/bsm/audit_internal.h#4 edit .. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit.c#9 edit .. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.c#5 edit .. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.h#7 edit .. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_syscalls.c#5 edit Differences ... ==== //depot/projects/soc2009/marinosi_appaudit/src/sys/bsm/audit_internal.h#4 (text) ==== @@ -143,7 +143,7 @@ * trailer magic number 2 bytes * record byte count 4 bytes */ -truct bsm_rec_tlr { +struct bsm_rec_tlr { u_char token_id; u_int16_t trailer_num; u_int32_t rec_byte_count; ==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit.c#9 (text) ==== @@ -730,8 +730,9 @@ void audit_slice_commit_rec(void *rec, struct audit_slice *as) { - struct kaudit_record *ar; - struct thread *td; + struct kaudit_record *ar = NULL; + struct thread *td = NULL; /* CHECK THIS */ + int error; @@ -746,9 +747,10 @@ * XXXAUDIT: Maybe AUE_AUDIT in the system call context and * special pre-select handling? */ - td->td_ar = audit_new(AUE_NULL, td); + td->td_ar = audit_new(AUE_NULL, td, as); if (td->td_ar == NULL) - return (ENOTSUP); + //return (ENOTSUP); + return; td->td_pflags |= TDP_AUDITREC; ar = td->td_ar; } ==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.c#5 (text+ko) ==== @@ -45,9 +45,11 @@ #include <sys/selinfo.h> #include <sys/uio.h> /* uio struct */ #include <sys/unistd.h> +#include <sys/endian.h> #include <security/audit/audit_slice.h> +#include <bsm/audit_internal.h> @@ -158,17 +160,18 @@ int c, error = 0; u_int32_t recsz = 0; int nbytes = 0; /*Remaining bytes */ - void *audit_slice_dev_buf, *as_rec; + struct bsm_rec_hdr *audit_slice_dev_buf; struct audit_slice *as; + void *as_rec; as = dev->si_drv1; /* Safe malloc the pagesz of the system.*/ - audit_slice_dev_buf = (void *)malloc(sizeof(struct bsm_rec_hdr), + audit_slice_dev_buf = malloc(sizeof(*audit_slice_dev_buf), M_TEMP, M_WAITOK); while (uio->uio_resid > 0) { - c = MIN((int)uio->uio_resid, sizeof(struct bsm_rec_hdr)); + c = MIN((int)uio->uio_resid, sizeof(*audit_slice_dev_buf)); if ( c == (int)uio->uio_resid ) break; ==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_slice.h#7 (text+ko) ==== @@ -193,3 +193,4 @@ void audit_slice_create(char *name); void audit_slice_destroy(struct audit_slice *as); void audit_slice_cdev_init(struct audit_slice *as); +void audit_slice_commit_rec(void *rec, struct audit_slice *as); ==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_syscalls.c#5 (text) ==== @@ -96,7 +96,7 @@ * XXXAUDIT: Maybe AUE_AUDIT in the system call context and * special pre-select handling? */ - td->td_ar = audit_new(AUE_NULL, td); + td->td_ar = audit_new(AUE_NULL, td, audit_base_slice); if (td->td_ar == NULL) return (ENOTSUP); td->td_pflags |= TDP_AUDITREC;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907141948.n6EJmixE035020>