Date: Wed, 15 Aug 2001 06:20:01 -0700 (PDT) From: Ruslan Ermilov <ru@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/29699: Setting NO_MAILWRAPPER results in a system without working MTA Message-ID: <200108151320.f7FDK1510630@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/29699; it has been noted by GNATS. From: Ruslan Ermilov <ru@FreeBSD.org> To: Peter Wemm <peter@wemm.org> Cc: bug-followup@FreeBSD.org Subject: Re: conf/29699: Setting NO_MAILWRAPPER results in a system without working MTA Date: Wed, 15 Aug 2001 16:11:00 +0300 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 14, 2001 at 01:00:03PM -0700, Peter Wemm wrote: > Andre Albsmeier wrote: > > When setting NO_MAILWRAPPER to /etc/make.conf sendmail still gets installed > > into /usr/libexec/sendmail/sendmail. In case mailwrapper has been used before, > > an old /usr/sbin/mailwrapper is lying around and usually the link from > > /usr/sbin/sendmail is set. When you remove mailwrapper from /usr/sbin > > the link is stale and no /usr/sbin/sendmail is available anymore. > > This was intentional. NO_MAILWRAPPER was added specifically to leave > /usr/sbin/sendmail *alone* so that people that clobbered it to install > their own MTA rather than using mailer.conf didn't get it overwritten. > > The problem with the attached patches (and the followups) is that they leave > /usr/libexec/sendmail/sendmail behind. If somebody really wants to change > this, then set a symlink from /usr/sbin/sendmail -> > /usr/libexec/sendmail/sendmail so that we dont have (potentially dangerous) > old setuid binaries left behind that are no longer getting updated. > They are broken even more, because /usr/bin/newaliases and /usr/bin/mailq do not get updated in the -DNO_MAILWRAPPER case. This is because the creation of these (sym)links belongs to sendmail/Makefile rather than to mailwrapper/Makefile, as it is now. The attached patch fixes this and the "old (potentially dangerous) setuid binary" problem, but in a different way. With NO_MAILWRAPPER, we should install sendmail(8) and friends into its canonical paths. Also, Peter, why did you drop the support for /usr/bin/hoststat and /usr/sbin/purgestat in sendmail/Makefile 1.14 -> mailwrapper/Makefile 1.1 change? Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: usr.sbin/mailwrapper/Makefile =================================================================== RCS file: /home/ncvs/src/usr.sbin/mailwrapper/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- usr.sbin/mailwrapper/Makefile 2001/07/20 06:19:59 1.8 +++ usr.sbin/mailwrapper/Makefile 2001/08/15 13:08:16 @@ -6,10 +6,6 @@ DPADD= ${LIBUTIL} LDADD= -lutil -SYMLINKS= ${BINDIR}/mailwrapper /usr/sbin/sendmail \ - ${BINDIR}/mailwrapper /usr/bin/newaliases \ - ${BINDIR}/mailwrapper /usr/bin/mailq - afterinstall: .if !exists(${DESTDIR}/etc/mail/mailer.conf) ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 \ Index: usr.sbin/sendmail/Makefile =================================================================== RCS file: /home/ncvs/src/usr.sbin/sendmail/Makefile,v retrieving revision 1.34 diff -u -r1.34 Makefile --- usr.sbin/sendmail/Makefile 2001/08/03 16:22:47 1.34 +++ usr.sbin/sendmail/Makefile 2001/08/15 13:08:16 @@ -7,8 +7,19 @@ SMDIR= ${SENDMAIL_DIR}/src .PATH: ${SMDIR} -BINDIR= /usr/libexec/sendmail +WRAPPED_BINDIR=/usr/libexec/sendmail +.if !defined(NO_MAILWRAPPER) +BINDIR= ${WRAPPED_BINDIR} + +SYMLINKS= /usr/sbin/mailwrapper /usr/sbin/sendmail \ + /usr/sbin/mailwrapper /usr/bin/newaliases \ + /usr/sbin/mailwrapper /usr/bin/mailq +.else +LINKS= ${BINDIR}/sendmail /usr/bin/newaliases \ + ${BINDIR}/sendmail /usr/bin/mailq +.endif + PROG= sendmail MAN= mailq.1 newaliases.1 aliases.5 sendmail.8 SRCS= alias.c arpadate.c bf_torek.c clock.c collect.c conf.c control.c \ @@ -65,5 +76,8 @@ mv -f ${DESTDIR}/etc/sendmail.cf \ ${DESTDIR}/etc/mail/sendmail.cf; \ fi +.if defined(NO_MAILWRAPPER) + rm -f ${DESTDIR}${WRAPPED_BINDIR}/${PROG} +.endif .include <bsd.prog.mk> --82I3+IH0IqGh5yIs-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108151320.f7FDK1510630>