authenticators and squid codeing question

From: Bart Bunting <bart@dont-contact.us>
Date: Thu, 19 Aug 1999 17:05:29 +1000 (EST)

hi again,
sory for the previous half finished post. -- hit the send key by mistake :-( emacs c-c c-c = send and c-x c-x = switch point and mark argggg@@!# :)
anyway,
I've been working on modifying squid to receive a group name along
with the ok returned from the authenticator.

i have a couple of questions about the function below.

if there is a better place to ask these questions please point me there.

static void
authenticateHandleReply(void *data, char *reply)
{
    authenticateStateData *r = data;
    int valid;
    char *t = NULL;
    debug(29, 5) ("authenticateHandleReply: {%s}\n", reply ? reply : "<NULL>");
    if (reply) {
this bit has me confused.
it appears to say if the string returned contains a space make reply = null.
        if ((t = strchr(reply, ' ')))
            *t = '\0';
        if (*reply == '\0')
            reply = NULL;
    }
what do the next two lines do?
    valid = cbdataValid(r->data);
    cbdataUnlock(r->data);
    if (valid)
and this one :)
        r->handler(r->data, reply);
    authenticateStateFree(r);
}

how would i go about replacing the username that was supplied to the
authenticator with the one returned by the authenticator.

sorry if these questions seem simple but it's my first try at modifying squid.

thanks for any advice.

Bart
Received on Thu Aug 19 1999 - 01:05:26 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:03 MST