Kim SungIn <windy@hyangdan.hit.co.kr> wrote the following:
> Dear sir.
>
> How are you?
> I would like to build Mailing list.
> I have it of version 1.93.
> But, I get error message like this:
> $echo help | /usr/lib/sendmail -v listname-request <return>
> listname-request... aliased to "|/user1/local/majordomo/bin/wrapper
> request-answer listname"
> Undefined subroutine "main'lopen" called at
> /user1/local/majordomo/bin/majordomo.pl line 229, <STDIN> line 1.
> "|/user1/local/majordomo/bin/wrapper request-answer listname" ... Sent
Well, Kim, it looks like you'll have to do the same thing that I did,
namely, patch the request-answer script. The problem is that
request-answer is trying to use the lopn subroutine, defined in
shlock.pl. However, since the script is missing the requisite
'required' statement, perl is complaining that it can't find the
subroutine.
Here's the context diff (diff -c) that I ran to compare my modified
copy of request-send and the distribution version (of course, my
location of perl will be different than your copy); please note you
can apply this patch automatically if you run 'patch' in the directory
where you have majordomo installed, and modify the pathname to your
distribution copy of request-answer, piping the following text to
'patch':
*** request-answer Fri Nov 10 23:30:18 1995
--- /tmp/majordomo-1.93/request-answer Mon Dec 26 15:48:33 1994
***************
*** 1,4 ****
! #!/usr/bin/perl
# $Source: /sources/cvsrepos/majordomo/request-answer,v $
# $Revision: 1.2.6.2.2.1 $
--- 1,5 ----
! #!/usr/local/bin/perl
!
# $Source: /sources/cvsrepos/majordomo/request-answer,v $
# $Revision: 1.2.6.2.2.1 $
***************
*** 28,34 ****
chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
unshift(@INC, $homedir);
- require "shlock.pl";
require "majordomo.pl";
&ParseMailHeader(STDIN, *hdrs);
--- 29,34 ----
***************
*** 37,49 ****
$in_reply_to = $hdrs{"message-id"} . ", from " . $hdrs{"from"};
$list = $ARGV[0];
! sub Do_Exec_Sendmail {
! exec("/usr/sbin/sendmail", "-f$list-request", "-t") ||
die("Failed to exec sendmail");
}
! open(MAIL, "|-") || &Do_Exec_Sendmail();
! print "after exec of sendmail";
print MAIL <<"EOM";
To: $reply_to
--- 37,48 ----
$in_reply_to = $hdrs{"message-id"} . ", from " . $hdrs{"from"};
$list = $ARGV[0];
! sub do_exec_sendmail {
! exec("/usr/lib/sendmail", "-f$list-request", "-t") ||
die("Failed to exec sendmail");
}
! open(MAIL, "|-") || &do_exec_sendmail();
print MAIL <<"EOM";
To: $reply_to
This patch does to things: adds 'require "shlock.pl"', and changes the
call to do_exec_sendmail to the locally renamed Do_Exec_Sendmail
(otherwise, Majordomo was complaining about unsafe usage of sendmail
or some such error.) Please try this out yourself, and make sure it
doesn't cause any security leaks by calling the modified version of
do_exec_sendmail. By the way, I just provided this patch for
illustration, and in no way do I guarantee that this will work
correctly and securely on your particular system.
By the way, if anyone knows what is unsafe about calling
request-answer's do_exec_sendmail, as opposed to majordomo.pl's
version, please let me know.
P.S. Is this question in a FAQ somewhere? I went through the archives
and didn't find anything that mentioned patching request-answer. It
would really be nice if all the patches that people have had to apply
to Majordomo were posted somewhere, with descriptions.
--
Dario Alcocer
alcocer@pino.connectnet.com
References:
|
|