From f6c55bbe1c2e913e94ff3b086b19f63cb9cc8a60 Mon Sep 17 00:00:00 2001 From: gshapiro Date: Fri, 24 May 2002 01:46:39 +0000 Subject: Add a new make.conf knob, SENDMAIL_MAP_PERMS, which specifies the permissions to use for alias and map database files built by /etc/mail/Makefile. The default is 0640 to assist users in avoiding a file locking local denial of service. MFC after: 1 day pending RE approval --- etc/mail/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'etc/mail') diff --git a/etc/mail/Makefile b/etc/mail/Makefile index 8a5a7ff..1212cf9 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -101,6 +101,9 @@ SENDMAIL?= /usr/sbin/sendmail MAKEMAP?= /usr/sbin/makemap M4?= /usr/bin/m4 +# Permissions for generated maps +SENDMAIL_MAP_PERMS?= 0640 + # Set a reasonable default .MAIN: all @@ -134,10 +137,12 @@ ${_f}: ${_f}.sample ${_f}.db: ${_f} ${MAKEMAP} ${SENDMAIL_MAP_TYPE} ${.TARGET} < ${.OODATE} + chmod ${SENDMAIL_MAP_PERMS} ${.TARGET} .endfor userdb.db: userdb ${MAKEMAP} btree ${.TARGET} < ${.OODATE} + chmod ${SENDMAIL_MAP_PERMS} ${.TARGET} # @@ -160,6 +165,7 @@ M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print # ${SENDMAIL_ALIASES}.db: ${SENDMAIL_ALIASES} ${SENDMAIL} -bi + chmod ${SENDMAIL_MAP_PERMS} ${.TARGET} # # ------------------------------------------------------------------------ -- cgit v1.1