PERFORCE change 104823 for review

Robert Watson rwatson at FreeBSD.org
Wed Aug 23 05:01:40 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104823

Change 104823 by rwatson at rwatson_sesame on 2006/08/23 05:00:49

	Don't encode the string "bsm" into the audit filter API, prefer the
	string "audit".
	
	Suggested by:	Martin Englund <Martin dot Englund at Sun dot COM>

Affected files ...

.. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#7 edit
.. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#4 edit
.. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#4 edit
.. //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#3 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#7 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#6 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#7 $
  */
 
 #include <sys/types.h>
@@ -106,13 +106,13 @@
  * Present raw BSM to a set of registered and interested filters.
  */
 static void
-present_bsmrecord(struct timespec *ts, u_char *data, u_int len)
+present_auditrecord(struct timespec *ts, u_char *data, u_int len)
 {
 	struct auditfilter_module *am;
 
 	TAILQ_FOREACH(am, &filter_list, am_list) {
-		if (am->am_bsmrecord != NULL)
-			(am->am_bsmrecord)(am->am_instance, ts, data, len);
+		if (am->am_auditrecord != NULL)
+			(am->am_auditrecord)(am->am_instance, ts, data, len);
 	}
 }
 
@@ -191,7 +191,7 @@
 			continue;
 		if (clock_gettime(CLOCK_REALTIME, &ts) < 0)
 			err(-1, "clock_gettime");
-		present_bsmrecord(&ts, buf, reclen);
+		present_auditrecord(&ts, buf, reclen);
 		present_tokens(&ts, buf, reclen);
 		free(buf);
 	}
@@ -241,7 +241,7 @@
 			continue;
 		if (clock_gettime(CLOCK_REALTIME, &ts) < 0)
 			err(-1, "clock_gettime");
-		present_bsmrecord(&ts, record, reclen);
+		present_auditrecord(&ts, record, reclen);
 		present_tokens(&ts, record, reclen);
 	}
 }

==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#3 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#4 $
  */
 
 #define	AUDITFILTERD_CONFFILE	"/etc/security/audit_filter"
@@ -57,7 +57,7 @@
 	audit_filter_attach_t				 am_attach;
 	audit_filter_reinit_t				 am_reinit;
 	audit_filter_record_t				 am_record;
-	audit_filter_bsmrecord_t			 am_bsmrecord;
+	audit_filter_auditrecord_t			 am_auditrecord;
 	audit_filter_detach_t				 am_detach;
 
 	/*

==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#3 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#4 $
  */
 
 /*
@@ -149,8 +149,8 @@
 	am->am_attach = dlsym(am->am_dlhandle, AUDIT_FILTER_ATTACH_STRING);
 	am->am_reinit = dlsym(am->am_dlhandle, AUDIT_FILTER_REINIT_STRING);
 	am->am_record = dlsym(am->am_dlhandle, AUDIT_FILTER_RECORD_STRING);
-	am->am_bsmrecord = dlsym(am->am_dlhandle,
-	    AUDIT_FILTER_BSMRECORD_STRING);
+	am->am_auditrecord = dlsym(am->am_dlhandle,
+	    AUDIT_FILTER_AUDITRECORD_STRING);
 	am->am_detach = dlsym(am->am_dlhandle, AUDIT_FILTER_DETACH_STRING);
 
 	if (am->am_attach != NULL) {
@@ -163,7 +163,7 @@
 			am->am_attach = NULL;
 			am->am_reinit = NULL;
 			am->am_record = NULL;
-			am->am_bsmrecord = NULL;
+			am->am_auditrecord = NULL;
 			am->am_detach = NULL;
 			return (-1);
 		}

==== //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#3 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#2 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#3 $
  */
 
 #ifndef _BSM_AUDIT_FILTER_H_
@@ -38,7 +38,7 @@
  * audit_filter_reinit_t - arguments to module have changed
  * audit_filter_record_t - present parsed record to filter module, with
  *                         receipt time
- * audit_filter_bsmrecord_t - present bsm format record to filter module,
+ * audit_filter_auditrecord_t - present BSM format record to filter module,
  *                            with receipt time
  * audit_filter_destach_t - filter module is being detached
  *
@@ -49,7 +49,7 @@
 typedef int (*audit_filter_reinit_t)(void *instance, int argc, char *argv[]);
 typedef void (*audit_filter_record_t)(void *instance, struct timespec *ts,
 	    int token_count, const tokenstr_t tok[]);
-typedef void (*audit_filter_bsmrecord_t)(void *instance, struct timespec *ts,
+typedef void (*audit_filter_auditrecord_t)(void *instance, struct timespec *ts,
 	    void *data, u_int len);
 typedef void (*audit_filter_detach_t)(void *instance);
 
@@ -66,12 +66,12 @@
 #define	AUDIT_FILTER_ATTACH	audit_filter_attach
 #define	AUDIT_FILTER_REINIT	audit_filter_reinit
 #define	AUDIT_FILTER_RECORD	audit_filter_record
-#define	AUDIT_FILTER_BSMRECORD	audit_filter_bsmrecord
+#define	AUDIT_FILTER_AUDITRECORD	audit_filter_auditrecord
 #define	AUDIT_FILTER_DETACH	audit_filter_detach
 #define	AUDIT_FILTER_ATTACH_STRING	"audit_filter_attach"
 #define	AUDIT_FILTER_REINIT_STRING	"audit_filter_reinit"
 #define	AUDIT_FILTER_RECORD_STRING	"audit_filter_record"
-#define	AUDIT_FILTER_BSMRECORD_STRING	"audit_filter_bsmrecord"
+#define	AUDIT_FILTER_AUDITRECORD_STRING	"audit_filter_auditrecord"
 #define	AUDIT_FILTER_DETACH_STRING	"audit_filter_detach"
 
 #endif /* !_BSM_AUDIT_FILTER_H_ */


More information about the trustedbsd-cvs mailing list