You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <ma...@apache.org> on 2007/08/31 12:41:36 UTC

[PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

From the 2.2.x STATUS doc:
   * mod_authn_dbd: Export any additional columns queried in the SQL select
     into the environment with the name AUTHENTICATE_<COLUMN>. This brings
     mod_authn_dbd behaviour in line with mod_authnz_ldap.
     Trunk: http://svn.apache.org/viewvc?view=rev&revision=466865
     +1: minfrin
     niq: This wants a little tidying.  Use of 13 as a magic number (for a
          strlen of something defined elsewhere) is nasty.  More importantly
          you need to document how it affects the module's directives.
          I'll +1 it when that's done.
     wrowe: ditto's - good concept.

Here's a patch to eliminate the "13", and to improve portability to
EBCDIC machines by using apr_toupper().

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>        |     Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730  Munich,  Germany

Re: [PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Graham Leggett wrote:
> Martin Kraemer wrote:
> 
>> Here's a patch to eliminate the "13", and to improve portability to
>> EBCDIC machines by using apr_toupper().
> 
> Some of this fooness here revolves around charset issues, something I am
> not clear on for many platforms.
> 
> The first question is, what is the charset of the names of environment
> variables on various platforms, the next is the charset of the names of
> LDAP attributes and database columns.


It doesn't matter; we should only perform c-locale case folding.  As soon
as you get beyond that, the same unicode characters fold differently in
different languages.

Bill

Re: [PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

Posted by Graham Leggett <mi...@sharp.fm>.
Martin Kraemer wrote:

> Here's a patch to eliminate the "13", and to improve portability to
> EBCDIC machines by using apr_toupper().

Some of this fooness here revolves around charset issues, something I am 
not clear on for many platforms.

The first question is, what is the charset of the names of environment 
variables on various platforms, the next is the charset of the names of 
LDAP attributes and database columns.

The apr_toupper() macro uses toupper() in the underlying implementation, 
which implies a char -> char mapping. According to the man pages on my 
Mac, towupper() gives a wide character mapping int -> int, but APR 
doesn't support this yet.

Regards,
Graham
--

AW: [PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.

> -----Ursprüngliche Nachricht-----
> Von: Martin Kraemer 
> Gesendet: Freitag, 31. August 2007 17:13
> An: dev@httpd.apache.org
> Betreff: Re: [PATCH] Eliminate "13" in 
> modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c
> 
> 
> On Fri, Aug 31, 2007 at 05:09:34PM +0200, Martin Kraemer wrote:
> > 
> > Should I commit, or do you?
> 
> Forgot to mention that I meant: commit to trunk.
> For 2.2.x, I'd prefer you do it.

For 2.2.x it needs to be added to the original backport proposal of course :-).
But given the current comments in the STATUS file for 2.2.x I guess we can get
the three +1's quickly then.

Regards

Rüdiger

Re: [PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

Posted by Martin Kraemer <ma...@apache.org>.
On Fri, Aug 31, 2007 at 05:09:34PM +0200, Martin Kraemer wrote:
> 
> Should I commit, or do you?

Forgot to mention that I meant: commit to trunk.
For 2.2.x, I'd prefer you do it.

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>        |     Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730  Munich,  Germany

Re: [PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

Posted by Martin Kraemer <ma...@apache.org>.
On Fri, Aug 31, 2007 at 12:54:44PM +0200, Graham Leggett wrote:
> > Here's a patch to eliminate the "13", and to improve portability to
> > EBCDIC machines by using apr_toupper().
> 
> Thanks for this - the fooness really needed to be sorted out before it was
> rolled out over the other authn mechanisms.

Should I commit, or do you?

> We have used the exposed extra columns to support autologin to bugzilla,
> amongst other things. The next plan is to update the docs to better
> explain how these work.
+1!

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>        |     Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730  Munich,  Germany

Re: [PATCH] Eliminate "13" in modules/aaa/mod_authn_dbd.c / modules/aaa/mod_authnz_ldap.c

Posted by Graham Leggett <mi...@sharp.fm>.
On Fri, August 31, 2007 12:41 pm, Martin Kraemer wrote:

> From the 2.2.x STATUS doc:
>    * mod_authn_dbd: Export any additional columns queried in the SQL
> select
>      into the environment with the name AUTHENTICATE_<COLUMN>. This brings
>      mod_authn_dbd behaviour in line with mod_authnz_ldap.
>      Trunk: http://svn.apache.org/viewvc?view=rev&revision=466865
>      +1: minfrin
>      niq: This wants a little tidying.  Use of 13 as a magic number (for a
>           strlen of something defined elsewhere) is nasty.  More
> importantly
>           you need to document how it affects the module's directives.
>           I'll +1 it when that's done.
>      wrowe: ditto's - good concept.
>
> Here's a patch to eliminate the "13", and to improve portability to
> EBCDIC machines by using apr_toupper().

Thanks for this - the fooness really needed to be sorted out before it was
rolled out over the other authn mechanisms.

We have used the exposed extra columns to support autologin to bugzilla,
amongst other things. The next plan is to update the docs to better
explain how these work.

Regards,
Graham
--