You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/06/26 18:55:40 UTC

Re: mod_auth-any/791: parsing of password file (username:password:extrafields) (fwd)

>ISTR that the last time many people suggested we should make it.  Votes?
>(Haven't looked at the patch too closely, just worried about the
>concept...)

+1 in concept, -1 on the patch (it sucks, codewise).  How about

    if (!strcmp(user,w)) {
        pfclose(r->pool, f);
        return pstrdup(r->pool, getword(r->pool, &rpw, ':'));
    }

....Roy

>diff -u mod_auth.c.orig mod_auth.c           
>--- mod_auth.c.orig     Thu Jun 26 16:43:24 1997
>+++ mod_auth.c  Thu Jun 26 16:22:17 1997
>@@ -127,8 +127,11 @@
>         w = getword(r->pool, &rpw, ':');
> 
>         if(!strcmp(user,w)) {
>-           pfclose(r->pool, f);
>-            return pstrdup (r->pool, rpw);
>+           const char *tmp;
>+           tmp = rpw;
>+           rpw = getword(r->pool, &tmp, ':');
>+           pfclose(r->pool, f);
>+           return pstrdup (r->pool, rpw);
>        }
>     }
>     pfclose(r->pool, f);


Re: mod_auth-any/791: parsing of password file (username:password:extrafields) (fwd)

Posted by Marc Slemko <ma...@worldgate.com>.
On Thu, 26 Jun 1997, Roy T. Fielding wrote:

> >ISTR that the last time many people suggested we should make it.  Votes?
> >(Haven't looked at the patch too closely, just worried about the
> >concept...)
> 
> +1 in concept, -1 on the patch (it sucks, codewise).  How about
> 
>     if (!strcmp(user,w)) {
>         pfclose(r->pool, f);
>         return pstrdup(r->pool, getword(r->pool, &rpw, ':'));
>     }

Why exactly do we need the pstrdup?