From owner-svn-src-stable@freebsd.org Tue Oct 2 15:18:50 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F356F109E107; Tue, 2 Oct 2018 15:18:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A58C88FD15; Tue, 2 Oct 2018 15:18:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C0BE1821; Tue, 2 Oct 2018 15:18:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w92FInWH005136; Tue, 2 Oct 2018 15:18:49 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w92FInXB005133; Tue, 2 Oct 2018 15:18:49 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201810021518.w92FInXB005133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 2 Oct 2018 15:18:49 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: contrib/openbsm/bsm etc/mtree tests/sys tests/sys/audit X-SVN-Commit-Revision: 339084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2018 15:18:50 -0000 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