I have a non root user that I use for all of my software builds (called
build strangely enough). All elements (apache, perl, mod_perl) were
built as this user. I just tried building as root as the email
suggested. It would not run apache as root, but tried to use
nobody(which did not work no matter how wide I ripped the permissions).
I forced it to run as the user that my webserver nomrally runs as by
setting APACHE_TEST_USER and APACHE_TEST_GROUP. Then the test hangs as
before.
I never got this message:
waiting for server to start: .No -M allowed while running setuid.
perl_parse: Address family not supported by protocol
!!!
The server always started successfully.
My perl is not configure to emulate setuid/setgid either.
Does perl 5.6 handle the setuid differently then 5.8?
Also, I'm confuse, does -M bypass the setuid code while stat get's
caught?
Shouldn't they both hang during make test?
My perl.c code looks like this:
STATIC void
S_forbid_setid(pTHX_ char *s)
{
if (PL_euid != PL_uid)
Perl_croak(aTHX_ "No %s allowed while running setuid", s);
if (PL_egid != PL_gid)
Perl_croak(aTHX_ "No %s allowed while running setgid", s);
}
So I changed it to never croak just for some smiles:
STATIC void
S_forbid_setid(pTHX_ char *s)
{
if (1 != 1)
Perl_croak(aTHX_ "No %s allowed while running setuid", s);
if (1 != 1)
Perl_croak(aTHX_ "No %s allowed while running setgid", s);
}
and make test still hangs.
---
Will Fulmer
Database Administrator
Northampton Community College
Bethlehem, PA
>>> Stas Bekman <[EMAIL PROTECTED]> 8/9/2004 2:05:48 PM >>>
William Fulmer wrote:
> Apologies. You are correct. I never responded directly to this
email.
>
> my $file = "/tmp";
> my $mtime = (stat $file)[9];
>
> and:
>
> my $file = __FILE__;
> my $mtime = (stat $file)[9];
>
> both fail (meaning the test hangs)
>
> -M __FILE__;
>
> and
>
> -M "/tmp";
>
> both work (which is to say that the test does not hang, but the test
> fails because stat returns number of seconds since the epoch and -M
> returns the number of days since last modification).
Right, but I think both perform stat(). I went back to your strace
message, which had:
write(2, "N o - M a l l o w e d w h ".., 36)
................................. = 36
with some googling I've found:
http://marc.theaimsgroup.com/?l=apache-modperl&m=104941790431878&w=2
which is talking about:
"waiting for server to start: .No -M allowed while running setuid.
perl_parse: Address family not supported by protocol
!!!
server has died with status 1 (please examine t/logs/error_log)
make: *** [run_tests] Error 143 "
Could that be your issue? Do you have setuid involved in your setup?
If you build mod_perl as root as Richard mentioned in the above URL, do
you get any difference?
the error is coming from perl.c:
STATIC void
S_forbid_setid(pTHX_ char *s)
{
#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW
if (PL_euid != PL_uid)
Perl_croak(aTHX_ "No %s allowed while running setuid", s);
if (PL_egid != PL_gid)
Perl_croak(aTHX_ "No %s allowed while running setgid", s);
#endif /* SETUID_SCRIPTS_ARE_SECURE_NOW */
/* PSz 29 Feb 04
* Checks for UID/GID above "wrong": why disallow
* perl -e 'print "Hello\n"'
* from within setuid things?? Simply drop them: replaced by
* fdscript/suidscript and #ifdef IAMSUID checks below.
*
* This may be too late for command-line switches. Will catch
those on
* the #! line, after finding the script name and setting up
* fdscript/suidscript. Note that suidperl does not get around to
* parsing (and checking) the switches on the #! line, but checks
that
* the two sets are identical.
*
* With SETUID_SCRIPTS_ARE_SECURE_NOW, could we use fdscript, also
or
* instead, or would that be "too late"? (We never have
suidscript, can
* we be sure to have fdscript?)
*
* Catch things with suidscript (in descendant of suidperl), even
with
* right UID/GID. Was already checked in suidperl, with #ifdef
IAMSUID,
* below; but I am paranoid.
*
* Also see comments about root running a setuid script,
elsewhere.
*/
> Apache, perl and mod_perl where all compiled with HP's ANSI C
compiler.
> The compiler is now with the latest version and patch level. Also,
> will point out that this is now under HP-UX 11i (11.11) was formerly
> HP-UX 11.00. Not sure this matters since the symptom's of the
problem
> remain unchanged. When I first reported the problem I was on the eve
of
> upgrading the OS on the server I've been trying to get this working
on.
That's good.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html