Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Stas Bekman <[EMAIL PROTECTED]> wrote on 11.09.2004 04:46:43: > Sorry, it was a different problem. This should fix it. Will commit that > shortly. > > Index: t/apr-ext/threadmutex.t > === > RCS file: /home/cvs/modperl-2.0/t/apr-ext/threadmutex.t,v > retrieving revision 1.1 > diff -u -r1.1 threadmutex.t > --- t/apr-ext/threadmutex.t 15 Jul 2004 15:30:24 - 1.1 > +++ t/apr-ext/threadmutex.t 11 Sep 2004 00:45:41 - > @@ -4,6 +4,6 @@ > > use TestAPRlib::threadmutex; > > -plan tests => TestAPRlib::threadmutex::num_of_tests(); > +plan tests => TestAPRlib::threadmutex::num_of_tests(), need_threads; > > TestAPRlib::threadmutex::test(); > tested this with mod perl 1.99_16. All tests successfull ! I only had to increase APACHE_TEST_STARTUP_TIMEOUT in order to run ModPerl-Registry tests. On my machine we had to wait for 267 seconds for apache to start in ModPerl-Registry tests. Thanks a lot. --Mikhail -- 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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
[EMAIL PROTECTED] wrote on 13.09.2004 11:14:21: > Stas Bekman <[EMAIL PROTECTED]> wrote on 11.09.2004 04:46:43: > > > Sorry, it was a different problem. This should fix it. Will commit that > > shortly. > > > > Index: t/apr-ext/threadmutex.t > > === > > RCS file: /home/cvs/modperl-2.0/t/apr-ext/threadmutex.t,v > > retrieving revision 1.1 > > diff -u -r1.1 threadmutex.t > > --- t/apr-ext/threadmutex.t 15 Jul 2004 15:30:24 - 1.1 > > +++ t/apr-ext/threadmutex.t 11 Sep 2004 00:45:41 - > > @@ -4,6 +4,6 @@ > > > > use TestAPRlib::threadmutex; > > > > -plan tests => TestAPRlib::threadmutex::num_of_tests(); > > +plan tests => TestAPRlib::threadmutex::num_of_tests(), need_threads; > > > > TestAPRlib::threadmutex::test(); > > > > tested this with mod perl 1.99_16. All tests successfull ! > > I only had to increase APACHE_TEST_STARTUP_TIMEOUT in order to run > ModPerl-Registry tests. On my machine we had to wait for 267 seconds for > apache to start in ModPerl-Registry tests. > > Thanks a lot. > > --Mikhail but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 for CVS result is the same: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/modperl-2.0/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/modperl-2.0/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 279. *** Error code 2 -- 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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
[EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. -- 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
ANNOUNCE: Bricolage 1.8.2 Released
The Bricolage development team is pleased to announce the release of Bricolage 1.8.2. This maintenance release addresses quite a large number of issues in Bricolage 1.8.1. The most important changes were to enhance Unicode support in Bricolage. Bricolage now internally handles all text content as UTF-8 strings, thus enabling templates to better control the manipulation of multibyte characters. Other changes include better performance for searches using the ANY() operators and more intelligent transaction handling for distribution jobs. Here are the other highlights of this release: Improvements * Bricolage now runs under a DSO mod_perl as long as it uses a Perl compiled with -Uusemymalloc or -Ubincompat5005. See http://perl.apache.org/docs/1.0/guide/install.html#When_DSO_can_be_Us ed for details. * Alerts triggered to be sent to users who don't have the appropriate contact information will now be logged for those users so that they can see them and acknowledge them under "My Alerts". * Added bric_media_dump script to contrib/. * The category association interface used in the story profile when the ENABLE_CATEGORY_BROWSER bricolage.conf directive is enabled now uses radio buttons instead of a link to select the primary category. * Existing jobs are now executed within their own transactions, as opposed to no transaction specification. This means that each job must succeed or fail independent of any other jobs. New jobs are executed before being inserted into the database so as to keep them atomic within their surrounding transaction (generally a UI request). All this means that transactionality is much more intelligent for jobs and will hopefully eliminate job table deadlocks. * All templates now execute with UTF-8 character strings enabled. This means that any templates that convert content to other character sets might need to change the way they do so. For example, templates that had used <%filter> blocks to convert content to another encoding using something like Encode::from_to($_, 'utf-8', $encoding) must now use something like $_ = Encode::encode($encoding, $_), instead. Bric::Util::CharTrans should continue to do the right thing. * Added encoding attribute to Bric::Util::Burner so that, if templates are outputting something other than Perl utf8 decoded data, they can specify what they're outputting, and the file opened for output from the templates will be set to the proper mode. Applies to Perl 5.8.0 and later only. * Added SFTP_HOME bricolage.conf directive to specify the home directory and location of SSH keys when SSH is enabled. Bug Fixes * make clone once again properly copies the lib/Makefile.PL and bin/Makefile.PL files from the source directory. * Added missing language-specifying HTML attributes so as to properly localize story titles and the like. * The list of output channels to add to an element in the element profile now contains the name of the site that each is associated with, since different sites can have output channels with the same names. * The "Advanced Search" interface once again works for searching for related story and media documents. * Bricolage no longer attempts to email alerts to an empty list of recipients. This will make your SMTP server happier. * The version numbering issues of Bricolage modules have all been worked out after the confusion in 1.8.1. This incidentally allows the HTML::Template and Template Toolkit burners to be available again. * Misspelling the name of a key name tag or including a non-repeatable field more than once in Super Bulk Edit no longer causes all of the changes in that screen to be lost. * When a user overrides the global "Date/Time Format" and "Time Zone" preferences, the affects of the overrides are now properly reflected in the UI. * Publishing a story or media document along with its related story or media documents from a publish desk again correctly publishes the original asset as well as the relateds. * Deleted output channels no longer show up in the select list for story type and media type elements. * Deleting a workflow from the workflow manager now properly updates the workflow cache so that the deleted workflow is removed from the left navigation without a restart. * When Bricolage notices that a document or template is not in workflow or on a desk when it should be, it is now more intelligent in trying to select the correct workflow and/or desk to put it on, based on current workflow context and user permissions. * Content submitted to Bricolage in the UTF-
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Carl Brewer wrote: [EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. Yes, but I've asked you to use cvs, where this has been fixed. Please confirm that it is the case. -- __ Stas BekmanJAm_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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
[EMAIL PROTECTED] wrote: Stas Bekman <[EMAIL PROTECTED]> wrote on 11.09.2004 04:46:43: Sorry, it was a different problem. This should fix it. Will commit that shortly. Index: t/apr-ext/threadmutex.t === RCS file: /home/cvs/modperl-2.0/t/apr-ext/threadmutex.t,v retrieving revision 1.1 diff -u -r1.1 threadmutex.t --- t/apr-ext/threadmutex.t 15 Jul 2004 15:30:24 - 1.1 +++ t/apr-ext/threadmutex.t 11 Sep 2004 00:45:41 - @@ -4,6 +4,6 @@ use TestAPRlib::threadmutex; -plan tests => TestAPRlib::threadmutex::num_of_tests(); +plan tests => TestAPRlib::threadmutex::num_of_tests(), need_threads; TestAPRlib::threadmutex::test(); tested this with mod perl 1.99_16. All tests successfull ! Excellent. I only had to increase APACHE_TEST_STARTUP_TIMEOUT in order to run ModPerl-Registry tests. On my machine we had to wait for 267 seconds for apache to start in ModPerl-Registry tests. Really? How long does it take to start the main test suite? Any idea why does it take so long? Or is that that slow machine that you gave me the access to a few months ago? -- __ Stas BekmanJAm_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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Joe Orton wrote: On Thu, Sep 09, 2004 at 11:38:15AM +0400, [EMAIL PROTECTED] wrote: I wasn't surprised this fails on OpenBSD but I am surprised it fails on NetBSD. Can you compile and run: http://www.apache.org/~jorton/nonblock.c and post the output. (it would be useful if you could do this on OpenBSD too, Ken, for verification) sorry for the dealy -- was away from my PC for a day k714% ./nonblock found port: 52984 O_NONBLOCK is not set in the child. This is rather confusing, since it means that apparently the test is working OK, and O_NONBLOCK is *not* inherited across accept() on NetBSD, which contradicts the behaviour you are seeing. Guys, could you please resolve this issue. It felt between the chairs and the new mod_perl release's test suite will still have this problem. The bug is in libapr and the sooner you resolve it the better. Could someone on the *BSD platform lead this effort and coordinate the resolution? Thanks. -- __ Stas BekmanJAm_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
Re: Hosting provider disallows mod_perl - "memory hog / unstable"
Hi Will, Thanks for taking the time to respond. What bothered me about your policy is that it accuses mod_perl of these things, and yet you offer PHP as an apache module. PHP has plenty of security issues when you don't run it as CGI, and you can certainly crash the server with it. > I'll see if we can update the kbase entry to be a little more specific > and not to sound so much like we're blaming mod_perl itself (not our > intent). Thank you, that would be much appreciated. I think that offering it on dedicated hosts (or virtual machines) is the best approach, and I'm glad see that you fully support that. - Perrin -- 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
Re: Hosting provider disallows mod_perl - "memory hog / unstable"
On 11 Sep 2004, at 20:35, Will Yardley wrote: But businesses don't just let various random people off the street write code and then load it on their servers. Explain the success of PHP then. Apparently the cross-site holes were tolerable for long enough... Will Yardley (of DreamHost) You guy suck a lot less than most ;-) -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- 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
Error building mod_perl 1.29 on Mac OS X 10.3.5.
Hi, I get the following error building mod_perl 1.29 on Mac OS X 10.3.5. I looked in the archives and see the problem reported multiple times but apparently without a resolution ? Joris. cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` modules.c cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` buildmark.c cc -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci`\ -o httpd buildmark.o modules.o modules/perl/libperl.a modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a -L/usr/local/lib /usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc ld: warning multiple definitions of symbol _regcomp regex/libregex.a(regcomp.o) definition of _regcomp in section (__TEXT,__text) /usr/lib/libdl.dylib(regcomp.So) definition of _regcomp ld: warning multiple definitions of symbol _regexec regex/libregex.a(regexec.o) definition of _regexec in section (__TEXT,__text) /usr/lib/libdl.dylib(regexec.So) definition of _regexec ld: warning multiple definitions of symbol _regfree regex/libregex.a(regfree.o) definition of _regfree in section (__TEXT,__text) /usr/lib/libdl.dylib(regfree.So) definition of _regfree ld: Undefined symbols: _actions_module _include_module _log_config_module make[3]: *** [target_static] Error 1 make[2]: *** [build-std] Error 2 make[1]: *** [build] Error 2 make: *** [apaci_httpd] Error 2 -- 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
Re: Error building mod_perl 1.29 on Mac OS X 10.3.5.
Joris Verboomen wrote: Hi, I get the following error building mod_perl 1.29 on Mac OS X 10.3.5. I looked in the archives and see the problem reported multiple times but apparently without a resolution ? Joris. cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` modules.c cc -c -I. -I/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -I./os/unix -I./include -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci` buildmark.c cc -DDARWIN -DMOD_PERL -DUSE_PERL_SSI -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -DUSE_HSREGEX -DNO_DL_NEEDED -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe `./apaci`\ -o httpd buildmark.o modules.o modules/perl/libperl.a modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a -L/usr/local/lib /usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.5/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc ld: warning multiple definitions of symbol _regcomp regex/libregex.a(regcomp.o) definition of _regcomp in section (__TEXT,__text) /usr/lib/libdl.dylib(regcomp.So) definition of _regcomp ld: warning multiple definitions of symbol _regexec regex/libregex.a(regexec.o) definition of _regexec in section (__TEXT,__text) /usr/lib/libdl.dylib(regexec.So) definition of _regexec ld: warning multiple definitions of symbol _regfree regex/libregex.a(regfree.o) definition of _regfree in section (__TEXT,__text) /usr/lib/libdl.dylib(regfree.So) definition of _regfree ld: Undefined symbols: _actions_module _include_module _log_config_module It's not the first time this problem is reported. Take a look at: http://www.google.ca/search?hl=fr&ie=UTF-8&q=Undefined+symbols%3A%0D%0A_actions_module%0D%0A_include_module%0D%0A_log_config_module+&btnG=Recherche+Google&meta= Apparently it works fine as DSO. I'm not on Mac OS X so I can't help much here :( -- __ Stas BekmanJAm_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
Apache::AuthenCache for mod_perl 1.99
I've made a quick port of this to mod_perl 1.99 - surprised to not see it already. Attached a diff and the full module. -D -- "A good messenger expects to get shot." --Larry Wall # $Id: AuthenCache.pm,v 1.6 2001/01/03 19:17:56 cgilmore Exp $ # # Author : Jason Bodnar, Christian Gilmore # Created On : Long ago # Status : Functional # # PURPOSE #User Authentication Cache # ### # Package name package Apache::AuthenCache; # Required libraries use strict; use mod_perl; use constant MP2 => $mod_perl::VERSION < 1.99 ? 0 : 1; BEGIN { if (MP2) { require Apache2; require Apache::Access; require Apache::RequestRec; require Apache::RequestUtil; require Apache::RequestIO; require Apache::ServerUtil; require Apache::Const; Apache::Const->import(-compile => qw(OK AUTH_REQUIRED DECLINED DONE)); require APR::Table; } else { require Apache; require Apache::Constants; Apache::Constants->import(qw(OK AUTH_REQUIRED DECLINED DONE)); } } use Apache::Log (); use IPC::Cache; # Global variables $Apache::AuthenCache::VERSION = '0.1'; ### ### # handler: hook into Apache/mod_perl API ### ### sub handler { my $r = shift; # only the first internal request unless ($r->is_initial_req()) { return MP2 ? Apache::OK() : Apache::Constants::OK(); } # Get configuration my $nopasswd = $r->dir_config('AuthenCache_NoPasswd') || 'off'; my $encrypted= $r->dir_config('AuthenCache_Encrypted') || 'on'; my $casesensitive= $r->dir_config('AuthenCache_CaseSensitive') || 'on'; my $cache_time_limit = $r->dir_config('AuthenCache_CacheTime') || 900; my $auth_name= $r->auth_name(); # Clear for paranoid security precautions my %notes = ('AuthenCache' => 'miss'); if (MP2) { my $table = APR::Table::make($r->pool(), 1); $table->set(%notes); $r->notes($table); } else { $r->notes(%notes); } # Get response and password my ($res, $passwd_sent) = $r->get_basic_auth_pw(); return $res if $res; # e.g. HTTP_UNAUTHORIZED # If the user left the username field blank, we must catch it and DECLINE # for the downstream handler my $user_sent = MP2 ? $r->user() : $r->connection()->user(); unless ($user_sent) { return MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED(); } $r->log->debug("handler: username=$user_sent"); # Do we want Windows-like case-insensitivity? if ($casesensitive eq 'off') { $user_sent = lc($user_sent); } # Create or retreive the cache (if already created) # Use the Realm name ($auth_name) for different caches for each realm my $cache = IPC::Cache->new({ namespace => $auth_name }); my $passwd = $cache->get($user_sent); # User not in cache unless ($passwd) { $r->log->debug("handler: user/group not in cache; returning DECLINED"); return MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED(); } # Is the user in the cache $r->log->debug("handler: using cached passwd for $user_sent"); # Allow no password if ($nopasswd eq 'on' and not length($passwd)) { $r->log->debug("handler: no password required; returning DONE"); # Must return DECLINED so that user has a chance to put in no password return MP2 ? Apache::DONE() : Apache::Constants::DONE(); } # If nopasswd is off, reject user unless (length($passwd_sent) and length($passwd)) { $r->log->debug("handler: user $user_sent: empty password(s) rejected" . $r->uri); # Must return DECLINED so that user has a chance to put in a new password return MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED(); } # Is crypt is needed if ($encrypted eq 'on') { my $salt = substr($passwd, 0, 2); $passwd_sent = crypt($passwd_sent, $salt); } unless ($passwd_sent eq $passwd) { $r->log->debug("AuthenCache::handler: user $user_sent: password mismatch" . $r->uri); # Must return DECLIN
Re: Apache::AuthenCache for mod_perl 1.99
Dan Sully wrote: I've made a quick port of this to mod_perl 1.99 - surprised to not see it already. Attached a diff and the full module. -D # $Id: AuthenCache.pm,v 1.6 2001/01/03 19:17:56 cgilmore Exp $ # # Author : Jason Bodnar, Christian Gilmore Dan, you probably want to CC the authors, in case they are not listening here... so it'll end up on CPAN... Thanks. -- __ Stas BekmanJAm_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
Re: Apache::AuthenCache for mod_perl 1.99
* Stas Bekman <[EMAIL PROTECTED]> shaped the electrons to say... Dan, you probably want to CC the authors, in case they are not listening here... so it'll end up on CPAN... Thanks. Already done - we'll see if they're listening elsewhere. -D -- "A good messenger expects to get shot." --Larry Wall -- 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
Re: Apache::AuthenCache for mod_perl 1.99
In message <[EMAIL PROTECTED]>, Dan Sully writes: >I've made a quick port of this to mod_perl 1.99 - surprised to not see it alre >ady. One of the reasons I haven't released the Apache::AuthenURL for mod_perl2 is because I haven't figured out how best to distribute my AuthenCache which is a rewrite of Jason and Chris's code for mp2 stacked handlers. Adding mp2 support to the mp1 code was giving me headaches so I started from scratch. Perhaps I should clean it up and ship it as Apache::AuthenURL::AuthenCache ? John [EMAIL PROTECTED] package Apache::AuthenCache; use strict; use mod_perl; use Apache::Log; use Apache::Status; use Apache::Access; use Apache::Const -compile => qw(HTTP_UNAUTHORIZED OK DECLINED DONE); use Apache::Module; use Apache::RequestRec; use Apache::RequestUtil; use APR::Table; use Cache::SharedMemoryCache; use Date::Format; use vars qw($VERSION); my $prefix = "Apache::AuthenCache"; $VERSION = '2.00'; my(%ConfigDefaults) = ( AuthenCache_Encrypted => 'on', AuthenCache_CacheTime => 'never', ); sub handler { my($r) = @_; return Apache::OK unless $r->is_initial_req; my($status, $password) = $r->get_basic_auth_pw; return $status unless $status == Apache::OK; my $auth_name = $r->auth_name; my $attribute = {}; while(my($key, $value) = each %ConfigDefaults) { $value = $r->dir_config($key) || $value; $key =~ s/^AuthenCache_//; $attribute->{$key} = lc $value; } my $cache = new Cache::SharedMemoryCache( { namespace => $auth_name }, default_expires_in => $attribute->{CacheTime}, ); my $user = $r->user; if (my $cached_password = $cache->get($user)) { $r->log->debug($prefix, "::handler: using cached password for $user"); if ($attribute->{Encrypted} eq 'on') { $r->log->debug($prefix, "::handler: encrypting password"); my $salt = substr($cached_password, 0, 2); $password = crypt($password, $salt); } if ($password eq $cached_password) { return Apache::OK; } else { $r->note_basic_auth_failure; return Apache::HTTP_UNAUTHORIZED; } } $r->push_handlers(PerlFixupHandler => \&manage_cache); return Apache::DECLINED; } sub manage_cache { my($r) = @_; my($status, $password) = $r->get_basic_auth_pw; my $attribute = {}; while(my($key, $value) = each %ConfigDefaults) { $value = $r->dir_config($key) || $value; $key =~ s/^AuthenCache_//; $attribute->{$key} = $value; } my $user = $r->user; my $auth_name = $r->auth_name; if ($attribute->{Encrypted} eq 'on') { $r->log->debug($prefix, "::manage_cache: encrypted password"); my @alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/'); my $salt = join ('', @alphabet[rand (64), rand (64)]); $password = crypt($password, $salt); } my $cache = new Cache::SharedMemoryCache( { namespace => $auth_name }, default_expires_in => $attribute->{CacheTime}, ); $cache->purge; $cache->set($user, $password, $attribute->{CacheTime}); $r->log->debug($prefix, "::manage_cache: storing user:", $user); return Apache::OK; } Apache::Status->menu_item( $prefix => "Authentication Cache", sub { my $caches = new Cache::SharedMemoryCache; my(@s) = ""; foreach my $namespace ($caches->get_namespaces) { my $cache = new Cache::SharedMemoryCache({namespace => $namespace}); push @s, "$namespace"; push @s, ""; push @s, "UsernameCreated AtExpires At"; foreach my $username ($cache->get_keys) { my $user = $cache->get_object($username); my $created_at = ctime $user->get_created_at; my $expires_at = ($user->get_expires_at eq "never") ? "NEVER" : ctime $user->get_expires_at; push @s, "$username", $created_at, "", $expires_at, ""; } push @s, ""; } push @s, ""; return [EMAIL PROTECTED]; }, ) if Apache::Module::loaded('Apache::Status'); 1; __END__ =head1 NAME Apache::AuthenCache - Authentication caching used in conjuction with a primary authentication module (eg Apache::AuthenURL) and mod_perl2 =head1 SYNOPSIS # In your httpd.conf PerlModule Apache::AuthenCache # In httpd.conf or .htaccess: AuthName Name AuthType Basic PerlAuthenHandler Apache::AuthenCache require valid-user # Optional parameters PerlSetVar AuthenCache_CacheTime 900 # Default: indefinite PerlSetVar AuthenCache_Encrypted Off # Default: On =head1 DESCRIPTION B implements a caching mechanism in order to speed up authentication and to reduce the usage of system resources. It must be used in conjunction with a regular mod_perl2 authentication module. It was designed
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Stas Bekman wrote: Carl Brewer wrote: [EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. Yes, but I've asked you to use cvs, where this has been fixed. Please confirm that it is the case. Current CVS checked out 10 mins ago : /usr/bin/perl -Iblib/lib -I/data/src/modperl-2.0/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /data/src/modperl-2.0/docs/api/APR/ThreadMutex.pod blib/lib/APR/ThreadMutex.pm glue_pod: can't find blib/lib/APR/ThreadMutex.pm at blib/lib/ModPerl/BuildMM.pm line 279. gmake: *** [glue_pods] Error 2 Sure enough, there's no ThreadMutex.pm in blib/lib/APR/ -- 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
Re: [mp2] NetBSD-1.6.2 modperl 1.99_16 httpd 2.0.51-dev make test errors
Carl Brewer wrote: Stas Bekman wrote: Carl Brewer wrote: [EMAIL PROTECTED] wrote: but make install for modperl-1.99_16 fails with the following: /usr/pkg/bin/perl -Iblib/lib/Apache2 -I/usr/home/mgorb/mp-test/mod_perl-1.99_16/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /usr/home/mgorb/mp-test/mod_perl-1.99_16/docs/api/APR/ThreadMutex.pod blib/lib/Apache2/APR/ThreadMutex.pm glue_pod: can't find blib/lib/Apache2/APR/ThreadMutex.pm at blib/lib/Apache2/ModPerl/BuildMM.pm line 275. *** Error code 2 I see the same problem on my i386 NetBSD 1.6.2 box. Yes, but I've asked you to use cvs, where this has been fixed. Please confirm that it is the case. Current CVS checked out 10 mins ago : /usr/bin/perl -Iblib/lib -I/data/src/modperl-2.0/Apache-Test/lib -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod WrapXS/APR/ThreadMutex/ThreadMutex.pm /data/src/modperl-2.0/docs/api/APR/ThreadMutex.pod blib/lib/APR/ThreadMutex.pm glue_pod: can't find blib/lib/APR/ThreadMutex.pm at blib/lib/ModPerl/BuildMM.pm line 279. gmake: *** [glue_pods] Error 2 Sure enough, there's no ThreadMutex.pm in blib/lib/APR/ Mea culpa, not sure why it did work for me. I guess my emulation of apr not having threads didn't work completely. Please try this patch: Index: lib/ModPerl/BuildMM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v retrieving revision 1.21 diff -u -r1.21 BuildMM.pm --- lib/ModPerl/BuildMM.pm 8 Sep 2004 04:10:09 - 1.21 +++ lib/ModPerl/BuildMM.pm 14 Sep 2004 00:36:00 - @@ -274,9 +274,7 @@ # it's possible that the .pm file is not existing # (e.g. ThreadMutex.pm is not created on unless # $apr_config->{HAS_THREADS}) -return unless -e $pm; - -die "glue_pod: can't find $dst" unless -e $dst; +return unless -e $pm && -e $dst; # have we already glued the doc? exit 0 unless -s $pm == -s $dst; -- __ Stas BekmanJAm_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