summaryrefslogtreecommitdiff
path: root/usr/src/cmd/auditd
diff options
context:
space:
mode:
authorJan Friedel <Jan.Friedel@Sun.COM>2010-02-19 16:36:35 +0100
committerJan Friedel <Jan.Friedel@Sun.COM>2010-02-19 16:36:35 +0100
commit8f775e0a5fbe731ba531e9ef613571bdb0adf6b3 (patch)
tree2dd09524c4d0947f5e1cb78b58a0f964cbb699cc /usr/src/cmd/auditd
parent17b6b3808f6f7a84408070a1a441854f7e70b784 (diff)
downloadillumos-joyent-8f775e0a5fbe731ba531e9ef613571bdb0adf6b3.tar.gz
6907614 Queue sequence number generated by auditd(1M) should be changed from uint32_t to uint64_t
Diffstat (limited to 'usr/src/cmd/auditd')
-rw-r--r--usr/src/cmd/auditd/doorway.c14
-rw-r--r--usr/src/cmd/auditd/plugin.h15
-rw-r--r--usr/src/cmd/auditd/queue.h11
3 files changed, 17 insertions, 23 deletions
diff --git a/usr/src/cmd/auditd/doorway.c b/usr/src/cmd/auditd/doorway.c
index b022332d24..5525fb37ea 100644
--- a/usr/src/cmd/auditd/doorway.c
+++ b/usr/src/cmd/auditd/doorway.c
@@ -19,11 +19,11 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* Threads:
*
@@ -766,7 +766,7 @@ qpool_return(plugin_t *p, audit_q_t *node)
int q_size;
#if DEBUG
- uint32_t sequence = node->aqq_sequence;
+ uint64_t sequence = node->aqq_sequence;
#endif
qpool_size = audit_queue_size(&(p->plg_pool));
q_size = audit_queue_size(&(p->plg_queue));
@@ -777,7 +777,7 @@ qpool_return(plugin_t *p, audit_q_t *node)
audit_enqueue(&(p->plg_pool), node);
DPRINT((dbfp,
- "qpool_return(%d): seq=%d, q size=%d,"
+ "qpool_return(%d): seq=%llu, q size=%d,"
" pool size=%d (total alloc=%d), threshhold=%d\n",
p->plg_tid, sequence, q_size, qpool_size,
q_size + qpool_size, p->plg_q_threshold));
@@ -813,7 +813,7 @@ bpool_return(audit_rec_t *node)
#if DEBUG
static void
-dump_state(char *src, plugin_t *p, int count, char *msg)
+dump_state(char *src, plugin_t *p, uint64_t count, char *msg)
{
struct sched_param param;
int policy;
@@ -821,7 +821,7 @@ dump_state(char *src, plugin_t *p, int count, char *msg)
* count is message sequence
*/
(void) pthread_getschedparam(p->plg_tid, &policy, &param);
- (void) fprintf(dbfp, "%7s(%d/%d) %11s:"
+ (void) fprintf(dbfp, "%7s(%d/%llu) %11s:"
" input_in_wait=%d"
" priority=%d"
" queue size=%d pool size=%d"
@@ -1222,7 +1222,7 @@ process(plugin_t *p)
#if DEBUG
if (q_node->aqq_sequence != p->plg_last_seq_out + 1)
(void) fprintf(dbfp,
- "process(%d): buffer sequence=%u but prev=%u\n",
+ "process(%d): buffer sequence=%llu but prev=%llu\n",
p->plg_tid, q_node->aqq_sequence,
p->plg_last_seq_out);
#endif
diff --git a/usr/src/cmd/auditd/plugin.h b/usr/src/cmd/auditd/plugin.h
index 0c4b24c6b4..368e15fe93 100644
--- a/usr/src/cmd/auditd/plugin.h
+++ b/usr/src/cmd/auditd/plugin.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
@@ -28,8 +27,6 @@
#ifndef _PLUGIN_H
#define _PLUGIN_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -56,7 +53,7 @@ struct plg {
char *plg_path; /* plugin path */
void *plg_dlptr; /* dynamic lib pointer */
- auditd_rc_t (*plg_fplugin)(const char *, size_t, int, char **);
+ auditd_rc_t (*plg_fplugin)(const char *, size_t, uint64_t, char **);
auditd_rc_t (*plg_fplugin_open)(const kva_t *, char **, char **);
auditd_rc_t (*plg_fplugin_close)(char **);
@@ -64,8 +61,8 @@ struct plg {
size_t plg_qmax; /* max queue size */
size_t plg_qmin; /* min queue size */
- uint32_t plg_sequence; /* buffer counter */
- uint32_t plg_last_seq_out; /* buffer counter (debug) */
+ uint64_t plg_sequence; /* buffer counter */
+ uint64_t plg_last_seq_out; /* buffer counter (debug) */
uint32_t plg_tossed; /* discards (debug) */
uint32_t plg_queued; /* count buffers queued */
uint32_t plg_output; /* count of buffers output */
diff --git a/usr/src/cmd/auditd/queue.h b/usr/src/cmd/auditd/queue.h
index d4c171763a..dd0d6a82f6 100644
--- a/usr/src/cmd/auditd/queue.h
+++ b/usr/src/cmd/auditd/queue.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
@@ -28,8 +27,6 @@
#ifndef _QUEUE_H
#define _QUEUE_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -60,7 +57,7 @@ typedef struct aqq audit_q_t; /* plugin queued data */
struct aqq {
audit_link_t aqq_l;
audit_rec_t *aqq_data;
- int aqq_sequence;
+ uint64_t aqq_sequence;
};
/* queue head */