From a3d4ae7cf351cc283a670d8400a89518a6b31d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 26 Jul 2025 11:59:53 +0200 Subject: [PATCH] dma: Don't install dma.conf world-readable While here, install auth.conf into /etc as well. MFC after: 3 days PR: 288409 Reviewed by: ivy, bapt Differential Revision: https://reviews.freebsd.org/D51529 --- ObsoleteFiles.inc | 3 +++ libexec/dma/dmagent/Makefile | 6 ++++-- tools/build/mk/OptionalObsoleteFiles.inc | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 385e891049e..10f99c5d604 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250726: This file is now installed in /etc/dma +OLD_FILES+=usr/share/examples/dma/auth.conf + # 20250725: libbsnmp bumped to version 7 OLD_LIBS+=usr/lib/libbsnmp.so.6 diff --git a/libexec/dma/dmagent/Makefile b/libexec/dma/dmagent/Makefile index 5f7deeea0b0..c8a3bd44a53 100644 --- a/libexec/dma/dmagent/Makefile +++ b/libexec/dma/dmagent/Makefile @@ -17,12 +17,14 @@ SRCS= aliases_parse.y \ util.c MAN8= dma.8 MLINKS= dma.8 dma.conf.5 -CONFS= dma.conf +CONFSMODE= 0640 +CONFSGRP= mail +CONFS= auth.conf dma.conf CONFSDIR= ${CONFDIR}/dma CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L YFLAGS+= -i CLEANFILES= aliases_parse.i -FILES= auth.conf mailer.conf +FILES= mailer.conf FILESDIR= ${SHAREDIR}/examples/dma BINMODE= 2555 diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 3183c5f0b45..f7eb1e979d0 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1473,12 +1473,12 @@ OLD_DIRS+=usr/share/dict .endif .if ${MK_DMAGENT} == no +OLD_FILES+=etc/dma/auth.conf OLD_FILES+=etc/dma/dma.conf OLD_DIRS+=etc/dma OLD_FILES+=usr/libexec/dma OLD_FILES+=usr/libexec/dma-mbox-create OLD_FILES+=usr/share/man/man8/dma.8.gz -OLD_FILES+=usr/share/examples/dma/auth.conf OLD_FILES+=usr/share/examples/dma/mailer.conf OLD_DIRS+=usr/share/examples/dma .endif