From owner-svn-src-stable-12@freebsd.org Thu Feb 14 20:29:34 2019 Return-Path: Delivered-To: svn-src-stable-12@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 CAE4C14E0541; Thu, 14 Feb 2019 20:29:34 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BBCE8A2C1; Thu, 14 Feb 2019 20:29:34 +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 41E86C3B7; Thu, 14 Feb 2019 20:29:34 +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 x1EKTYr0080424; Thu, 14 Feb 2019 20:29:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1EKTX1U080420; Thu, 14 Feb 2019 20:29:33 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201902142029.x1EKTX1U080420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Feb 2019 20:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344136 - in stable/12: libexec/rc/rc.d tests/sys tests/sys/audit tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/12: libexec/rc/rc.d tests/sys tests/sys/audit tools/build/mk X-SVN-Commit-Revision: 344136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4BBCE8A2C1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 20:29:35 -0000 Author: asomers Date: Thu Feb 14 20:29:33 2019 New Revision: 344136 URL: https://svnweb.freebsd.org/changeset/base/344136 Log: MFC r342153, r342172-r342173 r342153: Conditionally install /etc/rc.d/audit* based on ${MK_AUDIT} /usr/sbin/audit(dist)?d are only installed if ${MK_AUDIT} == yes. Their supporting scripts should only be installed in those instances as well. Submitted by: ngie Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd/pull/242 r342172: audit(4) tests: require /etc/rc.d/auditd These tests should be skipped if /etc/rc.d/auditd is missing, which could be the case if world was built with WITHOUT_AUDIT set. Also, one test case requires /etc/rc.d/accounting. Submitted by: ngie Pull Request: https://github.com/freebsd/freebsd/pull/240 r342173: Conditionalize installtion audit(4) tests on MK_AUDIT MK_AUDIT already controls auditd(8), praudit(1), etc. It should also control the audit test suite. Submitted by: ngie Pull Request: https://github.com/freebsd/freebsd/pull/240 Modified: stable/12/libexec/rc/rc.d/Makefile stable/12/tests/sys/Makefile stable/12/tests/sys/audit/Makefile stable/12/tests/sys/audit/administrative.c stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.d/Makefile ============================================================================== --- stable/12/libexec/rc/rc.d/Makefile Thu Feb 14 20:26:59 2019 (r344135) +++ stable/12/libexec/rc/rc.d/Makefile Thu Feb 14 20:29:33 2019 (r344136) @@ -15,8 +15,6 @@ CONFS= DAEMON \ addswap \ adjkerntz \ archdep \ - auditd \ - auditdistd \ bgfsck \ ${_blacklistd} \ ${_bluetooth} \ @@ -162,6 +160,12 @@ APM+= apm APM+= apmd .endif APMPACKAGE= apm +.endif + +.if ${MK_AUDIT} != "no" +CONFGROUPS+= AUDIT +AUDIT+= auditd +AUDIT+= auditdistd .endif .if ${MK_AUTOFS} != "no" Modified: stable/12/tests/sys/Makefile ============================================================================== --- stable/12/tests/sys/Makefile Thu Feb 14 20:26:59 2019 (r344135) +++ stable/12/tests/sys/Makefile Thu Feb 14 20:29:33 2019 (r344136) @@ -6,7 +6,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio -TESTS_SUBDIRS+= audit +TESTS_SUBDIRS+= ${_audit} TESTS_SUBDIRS+= auditpipe TESTS_SUBDIRS+= capsicum TESTS_SUBDIRS+= ${_cddl} @@ -27,6 +27,10 @@ TESTS_SUBDIRS+= posixshm TESTS_SUBDIRS+= sys TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm + +.if ${MK_AUDIT} != "no" +_audit= audit +.endif .if ${MK_CDDL} != "no" _cddl= cddl Modified: stable/12/tests/sys/audit/Makefile ============================================================================== --- stable/12/tests/sys/audit/Makefile Thu Feb 14 20:26:59 2019 (r344135) +++ stable/12/tests/sys/audit/Makefile Thu Feb 14 20:29:33 2019 (r344136) @@ -49,6 +49,7 @@ SRCS.miscellaneous+= utils.c TEST_METADATA+= timeout="30" TEST_METADATA+= required_user="root" TEST_METADATA+= is_exclusive="true" +TEST_METADATA+= required_files="/etc/rc.d/auditd" WARNS?= 6 Modified: stable/12/tests/sys/audit/administrative.c ============================================================================== --- stable/12/tests/sys/audit/administrative.c Thu Feb 14 20:26:59 2019 (r344135) +++ stable/12/tests/sys/audit/administrative.c Thu Feb 14 20:29:33 2019 (r344136) @@ -377,6 +377,8 @@ ATF_TC_HEAD(acct_success, tc) { atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " "acct(2) call"); + atf_tc_set_md_var(tc, "require.files", + "/etc/rc.d/accounting /etc/rc.d/auditd"); } ATF_TC_BODY(acct_success, tc) Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 14 20:26:59 2019 (r344135) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 14 20:29:33 2019 (r344136) @@ -147,6 +147,8 @@ OLD_FILES+=usr/share/man/man3/unistruct.3.gz .endif .if ${MK_AUDIT} == no +OLD_FILES+=etc/rc.d/auditd +OLD_FILES+=etc/rc.d/auditdistd OLD_FILES+=usr/sbin/audit OLD_FILES+=usr/sbin/auditd OLD_FILES+=usr/sbin/auditdistd @@ -158,6 +160,22 @@ OLD_FILES+=usr/share/man/man5/auditdistd.conf.5.gz OLD_FILES+=usr/share/man/man8/audit.8.gz OLD_FILES+=usr/share/man/man8/auditd.8.gz OLD_FILES+=usr/share/man/man8/auditdistd.8.gz +OLD_FILES+=usr/tests/sys/audit/process-control +OLD_FILES+=usr/tests/sys/audit/open +OLD_FILES+=usr/tests/sys/audit/network +OLD_FILES+=usr/tests/sys/audit/miscellaneous +OLD_FILES+=usr/tests/sys/audit/Kyuafile +OLD_FILES+=usr/tests/sys/audit/ioctl +OLD_FILES+=usr/tests/sys/audit/inter-process +OLD_FILES+=usr/tests/sys/audit/file-write +OLD_FILES+=usr/tests/sys/audit/file-read +OLD_FILES+=usr/tests/sys/audit/file-delete +OLD_FILES+=usr/tests/sys/audit/file-create +OLD_FILES+=usr/tests/sys/audit/file-close +OLD_FILES+=usr/tests/sys/audit/file-attribute-modify +OLD_FILES+=usr/tests/sys/audit/file-attribute-access +OLD_FILES+=usr/tests/sys/audit/administrative +OLD_DIRS+=usr/tests/sys/audit .endif .if ${MK_AUTHPF} == no