Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2019 20:29:33 +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-12@freebsd.org
Subject:   svn commit: r344136 - in stable/12: libexec/rc/rc.d tests/sys tests/sys/audit tools/build/mk
Message-ID:  <201902142029.x1EKTX1U080420@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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