Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2018 15:18:49 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r339084 - in stable/11: contrib/openbsm/bsm etc/mtree tests/sys tests/sys/audit
Message-ID:  <201810021518.w92FInXB005133@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Tue Oct  2 15:18:48 2018
New Revision: 339084
URL: https://svnweb.freebsd.org/changeset/base/339084

Log:
  MFC r334360, r334362, r334388, r334395
  
  r334360:
  Add initial set of tests for audit(4)
  
  This change includes the framework for testing the auditability of various
  syscalls, and includes changes for the first 12.  The tests will start
  auditd(8) if needed, though they'll be much faster if it's already running.
  The syscalls tested in this commit include mkdir(2), mkdirat(2), mknod(2),
  mknodat(2), mkfifo(2), mkfifoat(2), link(2), linkat(2), symlink(2),
  symlinkat(2), rename(2), and renameat(2).
  
  Submitted by:	aniketp
  Sponsored by:	Google, Inc (GSoC 2018)
  Differential Revision:	https://reviews.freebsd.org/D15286
  
  r334362 by emaste:
  Temporarily disconnect audit tests
  
  Audit tests added in r334360 broke the build on a number of archs.
  Remove the subdir from the top level tests/sys/Makefile until they're
  fixed.
  
  r334388:
  Fix OpenBSM with GCC with -Wredundant-decls
  
  Upstream change ed47534 consciously added some redundant functional
  declarations, and I'm not sure why. AFAICT they were never required. On
  FreeBSD, they break the build with GCC (but not Clang) for any program
  including libbsm.h with WARNS=6.
  
  Fix by cherry-picking upstream change
  https://github.com/openbsm/openbsm/commit/0553c27
  
  Reported by:	emaste
  Reviewed by:	cem
  Obtained from:	OpenBSM
  Pull Request:	https://github.com/openbsm/openbsm/pull/31
  
  r334395:
  Revert r334362
  
  Reconnect tests/sys/audit now that the GCC issue is fixed by 334388
  
  X-MFC-With:	334362, 334360, 334388

Added:
  stable/11/tests/sys/audit/
     - copied from r334360, head/tests/sys/audit/
Modified:
  stable/11/contrib/openbsm/bsm/libbsm.h
  stable/11/etc/mtree/BSD.tests.dist
  stable/11/tests/sys/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/openbsm/bsm/libbsm.h
==============================================================================
--- stable/11/contrib/openbsm/bsm/libbsm.h	Tue Oct  2 15:08:41 2018	(r339083)
+++ stable/11/contrib/openbsm/bsm/libbsm.h	Tue Oct  2 15:18:48 2018	(r339084)
@@ -868,21 +868,6 @@ void			 au_print_tok_xml(FILE *outfp, tokenstr_t *tok,
 void			 au_print_xml_header(FILE *outfp);
 void			 au_print_xml_footer(FILE *outfp);
 
-/*
- * BSM library routines for converting between local and BSM constant spaces.
- * (Note: some of these are replicated in audit_record.h for the benefit of
- * the FreeBSD and Mac OS X kernels)
- */
-int	 au_bsm_to_domain(u_short bsm_domain, int *local_domainp);
-int	 au_bsm_to_errno(u_char bsm_error, int *errorp);
-int	 au_bsm_to_fcntl_cmd(u_short bsm_fcntl_cmd, int *local_fcntl_cmdp);
-int	 au_bsm_to_socket_type(u_short bsm_socket_type,
-	    int *local_socket_typep);
-u_short	 au_domain_to_bsm(int local_domain);
-u_char	 au_errno_to_bsm(int local_errno);
-u_short	 au_fcntl_cmd_to_bsm(int local_fcntl_command);
-u_short	 au_socket_type_to_bsm(int local_socket_type);
-
 const char	 *au_strerror(u_char bsm_error);
 __END_DECLS
 

Modified: stable/11/etc/mtree/BSD.tests.dist
==============================================================================
--- stable/11/etc/mtree/BSD.tests.dist	Tue Oct  2 15:08:41 2018	(r339083)
+++ stable/11/etc/mtree/BSD.tests.dist	Tue Oct  2 15:18:48 2018	(r339084)
@@ -420,6 +420,8 @@
         ..
         aio
         ..
+        audit
+        ..
         capsicum
         ..
         fifo

Modified: stable/11/tests/sys/Makefile
==============================================================================
--- stable/11/tests/sys/Makefile	Tue Oct  2 15:08:41 2018	(r339083)
+++ stable/11/tests/sys/Makefile	Tue Oct  2 15:18:48 2018	(r339084)
@@ -4,6 +4,7 @@ TESTSDIR=		${TESTSBASE}/sys
 
 TESTS_SUBDIRS+=		acl
 TESTS_SUBDIRS+=		aio
+TESTS_SUBDIRS+=		audit
 TESTS_SUBDIRS+=		capsicum
 TESTS_SUBDIRS+=		fifo
 TESTS_SUBDIRS+=		file



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810021518.w92FInXB005133>