PERFORCE change 104827 for review
Robert Watson
rwatson at FreeBSD.org
Wed Aug 23 06:08:47 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104827
Change 104827 by rwatson at rwatson_sesame on 2006/08/23 06:07:35
Rename OpenBSM-internal audit header and trailer size constants to
use AUDIT_ instead of BSM_ prefixes.
Suggested by: Martin Englund <Martin dot Englund at Sun dot COM>
Affected files ...
.. //depot/projects/trustedbsd/openbsm/bsm/audit_internal.h#14 edit
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#27 edit
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#40 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/bsm/audit_internal.h#14 (text+ko) ====
@@ -34,7 +34,7 @@
*
* @APPLE_BSD_LICENSE_HEADER_END@
*
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_internal.h#13 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_internal.h#14 $
*/
#ifndef _AUDIT_INTERNAL_H
@@ -68,15 +68,15 @@
typedef struct au_record au_record_t;
-/* We could determined the header and trailer sizes by
- * defining appropriate structures. We hold off that approach
- * till we have a consistant way of using structures for all tokens.
- * This is not straightforward since these token structures may
- * contain pointers of whose contents we dont know the size
- * (e.g text tokens)
+/*
+ * We could determined the header and trailer sizes by defining appropriate
+ * structures. We hold off that approach until we have a consistant way of
+ * using structures for all tokens. This is not straightforward since these
+ * token structures may contain pointers of whose contents we dont know the
+ * size (e.g text tokens).
*/
-#define BSM_HEADER_SIZE 18
-#define BSM_TRAILER_SIZE 7
+#define AUDIT_HEADER_SIZE 18
+#define AUDIT_TRAILER_SIZE 7
/*
* BSM token streams store fields in big endian byte order, so as to be
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#27 (text+ko) ====
@@ -30,7 +30,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#26 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#27 $
*/
#include <sys/types.h>
@@ -174,7 +174,7 @@
return (-1); /* Invalid descriptor */
}
- if (rec->len + tok->len + BSM_TRAILER_SIZE > MAX_AUDIT_RECORD_SIZE) {
+ if (rec->len + tok->len + AUDIT_TRAILER_SIZE > MAX_AUDIT_RECORD_SIZE) {
errno = ENOMEM;
return (-1);
}
@@ -208,7 +208,7 @@
u_char *dptr;
int error;
- tot_rec_size = rec->len + BSM_HEADER_SIZE + BSM_TRAILER_SIZE;
+ tot_rec_size = rec->len + AUDIT_HEADER_SIZE + AUDIT_TRAILER_SIZE;
header = au_to_header32(tot_rec_size, event, 0);
if (header == NULL)
return (-1);
@@ -285,7 +285,7 @@
goto cleanup;
}
- tot_rec_size = rec->len + BSM_HEADER_SIZE + BSM_TRAILER_SIZE;
+ tot_rec_size = rec->len + AUDIT_HEADER_SIZE + AUDIT_TRAILER_SIZE;
if (tot_rec_size > MAX_AUDIT_RECORD_SIZE) {
/*
@@ -335,7 +335,7 @@
}
retval = 0;
- tot_rec_size = rec->len + BSM_HEADER_SIZE + BSM_TRAILER_SIZE;
+ tot_rec_size = rec->len + AUDIT_HEADER_SIZE + AUDIT_TRAILER_SIZE;
if ((tot_rec_size > MAX_AUDIT_RECORD_SIZE) ||
(tot_rec_size > *buflen)) {
/*
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#40 (text+ko) ====
@@ -31,7 +31,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#39 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#40 $
*/
#include <sys/types.h>
@@ -2448,7 +2448,7 @@
int err = 0;
int recoversize;
- recoversize = len - (tok->len + BSM_TRAILER_SIZE);
+ recoversize = len - (tok->len + AUDIT_TRAILER_SIZE);
if (recoversize <= 0)
return (-1);
More information about the trustedbsd-cvs
mailing list