NetBSD Problem Report #34513
From jbernard@knox.mines.edu Tue Sep 12 17:38:00 2006
Return-Path: <jbernard@knox.mines.edu>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 659B963BBD3
for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 Sep 2006 17:38:00 +0000 (UTC)
Message-Id: <200609121636.k8CGarFd025050@knox.mines.edu>
Date: Tue, 12 Sep 2006 10:36:53 -0600 (MDT)
From: jbernard@mines.edu
Reply-To: jbernard@mines.edu
To: gnats-bugs@NetBSD.org
Subject: mail/sendmail sets smrsh command dir to /usr/adm/sm.bin
X-Send-Pr-Version: 3.95
>Number: 34513
>Category: pkg
>Synopsis: mail/sendmail sets smrsh command dir to /usr/adm/sm.bin
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: tv
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 12 17:40:00 +0000 2006
>Closed-Date: Fri Oct 13 14:01:20 +0000 2006
>Last-Modified: Fri Oct 13 14:01:20 +0000 2006
>Originator: Jim Bernard
>Release: NetBSD 3.99.20
>Organization:
>Environment:
System: NetBSD 3.99.20 i386
Architecture: i386
Machine: i386
>Description:
The default location of the smrsh command directory (which contains
binaries that sendmail is allowed to run via the "prog" mailer) in
the source from sendmail is /usr/adm/bin, which is nonexistent
on NetBSD (and many other) systems. The smrsh.c source file will
change the compiled-in command directory if the preprocessor symbols
CMDDIR or SMRSH_CMDDIR are defined, and the pkg Makefile attempts to
do this by setting:
SMRSH_CMDDIR?= ${PREFIX}/libexec/sm.bin
However, this never gets to the cc command line, so the default is
used, and the sendmail prog mailer fails to work.
>How-To-Repeat:
Install the mail/sendmail package and
strings /usr/pkg/libexec/sendmail/smrsh | grep sm.bin
The result is
/usr/adm/sm.bin
Also, if you look at the build log, you'll see that smrsh.c was
compiled without any mention of SMRSH_CMDDIR on the command line:
cc -O -I. -I../../sendmail -I../../include -DNEWDB -DNIS -DMAP_REGEX -DNETISO -I/usr/pkg/include -DTCPWRAPPERS -DNOT_SENDMAIL -I/usr/include -c smrsh.c
>Fix:
Unknown. A quick and dirty workaround is to extract the source
and patch smrsh.c.
FWIW: This was reported in pkg/21012 back in April of 2003 and
ostensibly fixed in September of 2003. I'm not sure if it wasn't
really fixed then or has regressed. It might be worthwhile to
put in a post-build check to verify that the compiled-in value
matches the value of ${SMRSH_CMDDIR}.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->tv
Responsible-Changed-By: ben@netbsd.org
Responsible-Changed-When: Wed, 13 Sep 2006 11:33:50 +0000
Responsible-Changed-Why:
Assigned to package maintainer, tv.
From: Todd Vierling <tv@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/34513 CVS commit: pkgsrc/mail/sendmail
Date: Thu, 12 Oct 2006 21:04:27 +0000 (UTC)
Module Name: pkgsrc
Committed By: tv
Date: Thu Oct 12 21:04:27 UTC 2006
Modified Files:
pkgsrc/mail/sendmail: MESSAGE Makefile Makefile.common
pkgsrc/mail/sendmail/files: site.config.m4
Log Message:
8.13.8nb2:
Don't install .cf files to /etc/mail directly at all; offer a message
about how to install them instead. Don't create /etc/mail/statistics.
Create mqueue dirs at install via MAKE_DIRS. Should fix PR pkg/20852.
Make sure SMRSH_CMDDIR gets to the compile defs. Fixes PR pkg/34513.
To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 pkgsrc/mail/sendmail/MESSAGE
cvs rdiff -r1.92 -r1.93 pkgsrc/mail/sendmail/Makefile
cvs rdiff -r1.38 -r1.39 pkgsrc/mail/sendmail/Makefile.common
cvs rdiff -r1.5 -r1.6 pkgsrc/mail/sendmail/files/site.config.m4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: tv@netbsd.org
State-Changed-When: Thu, 12 Oct 2006 21:08:53 +0000
State-Changed-Why:
Please confirm that sendmail-8.13.8nb2 (or later) fixes the problem.
From: Jim Bernard <jbernard@mines.edu>
To: gnats-bugs@NetBSD.org
Cc: tv@NetBSD.org, pkgsrc-bugs@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: pkg/34513 (mail/sendmail sets smrsh command dir to /usr/adm/sm.bin)
Date: Thu, 12 Oct 2006 20:05:32 -0600
On Thu, Oct 12, 2006 at 09:08:54PM +0000, tv@NetBSD.org wrote:
> Synopsis: mail/sendmail sets smrsh command dir to /usr/adm/sm.bin
>
> State-Changed-From-To: open->feedback
> State-Changed-By: tv@netbsd.org
> State-Changed-When: Thu, 12 Oct 2006 21:08:53 +0000
> State-Changed-Why:
> Please confirm that sendmail-8.13.8nb2 (or later) fixes the problem.
Almost. The value of SMRSH_CMDDIR now gets to the compiler command line,
but the default setting breaks the compilation of smrsh. The problem is
that the usage in smrsh.c requires quotes around the string, which have to
be escaped on the shell command line. This patch to files/site.config.m4
does the trick:
19c19
< APPENDDEF(`confENVDEF', `-I${PREFIX}/include -DSMRSH_CMDDIR=${SMRSH_CMDDIR}')
---
> APPENDDEF(`confENVDEF', `-I${PREFIX}/include -DSMRSH_CMDDIR=\"${SMRSH_CMDDIR}\"')
Thanks for fixing it!
State-Changed-From-To: feedback->closed
State-Changed-By: tv@netbsd.org
State-Changed-When: Fri, 13 Oct 2006 14:01:20 +0000
State-Changed-Why:
Thanks for the catch. It's completely fixed now.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.