PERFORCE change 92527 for review

Robert Watson rwatson at FreeBSD.org
Tue Feb 28 06:07:43 PST 2006


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

Change 92527 by rwatson at rwatson_lethe.cl.cam.ac.uk on 2006/02/28 14:07:01

	Only implement au_close() if audit system calls are available, as
	otherwise we can't submit it.  au_close_buffer() remains
	available even without audit system calls, so the remainder of
	the record construction calls remain useful.  (Linux)

Affected files ...

.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#21 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#21 (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#20 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#21 $
  */
 
 #include <sys/types.h>
@@ -266,11 +266,13 @@
 	pthread_mutex_unlock(&mutex);
 }
 
+#ifdef HAVE_AUDIT_SYSCALLS
 /*
  * Add the header token, identify any missing tokens.  Write out the tokens to
  * the record memory and finally, call audit.
  */
-int au_close(int d, int keep, short event)
+int
+au_close(int d, int keep, short event)
 {
 	au_record_t *rec;
 	size_t tot_rec_size;
@@ -318,6 +320,7 @@
 	au_teardown(rec);
 	return (retval);
 }
+#endif /* HAVE_AUDIT_SYSCALLS */
 
 /*
  * au_close(), except onto an in-memory buffer.  Buffer size as an argument,


More information about the trustedbsd-cvs mailing list