httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject Re: mod_auth-any/791: parsing of password file (username:password:extrafields) (fwd)
Date Thu, 26 Jun 1997 16:55:40 GMT
>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);


Mime
View raw message