You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@cpan.org> on 2004/03/04 22:55:57 UTC

Re: funny action of crypt

On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
> hara@cathand.com wrote:
> > Hi
> > 
> > I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
> > and some CGI scripts with password encryption.
> > 
> > Script is ...
> > 
> > $password = crypt($password, &mkSalt($name.$password.$value) );
> > 
> > [...]
> mod_perl 2 has a workaround for 5.8.0:
> 
> /* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
> #if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
>      defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
>      /* workaround perl5.8.0/glibc bug */
>      PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
> #endif
> 
> I haven't seen it in the mp1 code.

Is this workaround worth considering for backporting in mp1 ?


> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org 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: funny action of crypt

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Thu, 2004-03-04 at 14:21 -0800, Stas Bekman wrote:
> 
>>Philippe M. Chiasson wrote:
>>
>>>On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
>>>
>>>
>>>>hara@cathand.com wrote:
>>>>
>>>>
>>>>>Hi
>>>>>
>>>>>I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
>>>>>and some CGI scripts with password encryption.
>>>>>
>>>>>Script is ...
>>>>>
>>>>>$password = crypt($password, &mkSalt($name.$password.$value) );
>>>>>
>>>>>[...]
>>>>
>>>>mod_perl 2 has a workaround for 5.8.0:
>>>>
>>>>/* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
>>>>#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
>>>>    defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
>>>>    /* workaround perl5.8.0/glibc bug */
>>>>    PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
>>>>#endif
>>>>
>>>>I haven't seen it in the mp1 code.
>>>
>>>
>>>Is this workaround worth considering for backporting in mp1 ?
>>
>>Looks like so. Hara has failed to respond back to the list and emailed me 
>>privately. And this did solve his problem after he stuck the above code 
>>somewhere in mod_perl.c. And yes, he was running 5.8.0.
> 
> 
> Allright, I'll apply this fix to mp1 soon then.

I thought this had to do with threads... writing a test case that you can 
reproduce the problem with should be helpful. Could probably check the 
archives to find the discussion about the original report. The issue was with 
rand always starting from the same init value under threads. But I'm not sure 
how this affects a single interpreter-process.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: funny action of crypt

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Thu, 2004-03-04 at 14:21 -0800, Stas Bekman wrote:
> 
>>Philippe M. Chiasson wrote:
>>
>>>On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
>>>
>>>
>>>>hara@cathand.com wrote:
>>>>
>>>>
>>>>>Hi
>>>>>
>>>>>I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
>>>>>and some CGI scripts with password encryption.
>>>>>
>>>>>Script is ...
>>>>>
>>>>>$password = crypt($password, &mkSalt($name.$password.$value) );
>>>>>
>>>>>[...]
>>>>
>>>>mod_perl 2 has a workaround for 5.8.0:
>>>>
>>>>/* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
>>>>#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
>>>>    defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
>>>>    /* workaround perl5.8.0/glibc bug */
>>>>    PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
>>>>#endif
>>>>
>>>>I haven't seen it in the mp1 code.
>>>
>>>
>>>Is this workaround worth considering for backporting in mp1 ?
>>
>>Looks like so. Hara has failed to respond back to the list and emailed me 
>>privately. And this did solve his problem after he stuck the above code 
>>somewhere in mod_perl.c. And yes, he was running 5.8.0.
> 
> 
> Allright, I'll apply this fix to mp1 soon then.

I thought this had to do with threads... writing a test case that you can 
reproduce the problem with should be helpful. Could probably check the 
archives to find the discussion about the original report. The issue was with 
rand always starting from the same init value under threads. But I'm not sure 
how this affects a single interpreter-process.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org 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: funny action of crypt

Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Thu, 2004-03-04 at 14:21 -0800, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> > On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
> > 
> >>hara@cathand.com wrote:
> >>
> >>>Hi
> >>>
> >>>I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
> >>>and some CGI scripts with password encryption.
> >>>
> >>>Script is ...
> >>>
> >>>$password = crypt($password, &mkSalt($name.$password.$value) );
> >>>
> >>>[...]
> >>
> >>mod_perl 2 has a workaround for 5.8.0:
> >>
> >>/* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
> >>#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
> >>     defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
> >>     /* workaround perl5.8.0/glibc bug */
> >>     PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
> >>#endif
> >>
> >>I haven't seen it in the mp1 code.
> > 
> > 
> > Is this workaround worth considering for backporting in mp1 ?
> 
> Looks like so. Hara has failed to respond back to the list and emailed me 
> privately. And this did solve his problem after he stuck the above code 
> somewhere in mod_perl.c. And yes, he was running 5.8.0.

Allright, I'll apply this fix to mp1 soon then.

> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: funny action of crypt

Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Thu, 2004-03-04 at 14:21 -0800, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> > On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
> > 
> >>hara@cathand.com wrote:
> >>
> >>>Hi
> >>>
> >>>I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
> >>>and some CGI scripts with password encryption.
> >>>
> >>>Script is ...
> >>>
> >>>$password = crypt($password, &mkSalt($name.$password.$value) );
> >>>
> >>>[...]
> >>
> >>mod_perl 2 has a workaround for 5.8.0:
> >>
> >>/* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
> >>#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
> >>     defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
> >>     /* workaround perl5.8.0/glibc bug */
> >>     PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
> >>#endif
> >>
> >>I haven't seen it in the mp1 code.
> > 
> > 
> > Is this workaround worth considering for backporting in mp1 ?
> 
> Looks like so. Hara has failed to respond back to the list and emailed me 
> privately. And this did solve his problem after he stuck the above code 
> somewhere in mod_perl.c. And yes, he was running 5.8.0.

Allright, I'll apply this fix to mp1 soon then.

> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: funny action of crypt

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
> 
>>hara@cathand.com wrote:
>>
>>>Hi
>>>
>>>I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
>>>and some CGI scripts with password encryption.
>>>
>>>Script is ...
>>>
>>>$password = crypt($password, &mkSalt($name.$password.$value) );
>>>
>>>[...]
>>
>>mod_perl 2 has a workaround for 5.8.0:
>>
>>/* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
>>#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
>>     defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
>>     /* workaround perl5.8.0/glibc bug */
>>     PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
>>#endif
>>
>>I haven't seen it in the mp1 code.
> 
> 
> Is this workaround worth considering for backporting in mp1 ?

Looks like so. Hara has failed to respond back to the list and emailed me 
privately. And this did solve his problem after he stuck the above code 
somewhere in mod_perl.c. And yes, he was running 5.8.0.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org 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: funny action of crypt

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Wed, 2004-03-03 at 18:14 -0800, Stas Bekman wrote:
> 
>>hara@cathand.com wrote:
>>
>>>Hi
>>>
>>>I have a problem when my apache_1.3.29 w/ mod_perl 1.29 runs PerlRun
>>>and some CGI scripts with password encryption.
>>>
>>>Script is ...
>>>
>>>$password = crypt($password, &mkSalt($name.$password.$value) );
>>>
>>>[...]
>>
>>mod_perl 2 has a workaround for 5.8.0:
>>
>>/* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
>>#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 0 && \
>>     defined(USE_REENTRANT_API) && defined(HAS_CRYPT_R) && defined(__GLIBC__)
>>     /* workaround perl5.8.0/glibc bug */
>>     PL_reentrant_buffer->_crypt_struct.current_saltbits = 0;
>>#endif
>>
>>I haven't seen it in the mp1 code.
> 
> 
> Is this workaround worth considering for backporting in mp1 ?

Looks like so. Hara has failed to respond back to the list and emailed me 
privately. And this did solve his problem after he stuck the above code 
somewhere in mod_perl.c. And yes, he was running 5.8.0.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org