Subject: pkg/34513: mail/sendmail sets smrsh command dir to /usr/adm/sm.bin
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <jbernard@mines.edu>
List: pkgsrc-bugs
Date: 09/12/2006 17:40:00
>Number: 34513
>Category: pkg
>Synopsis: mail/sendmail sets smrsh command dir to /usr/adm/sm.bin
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 12 17:40:00 +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}.