Re: [squid-users] Question about authenticateNegotiateHandleReply

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Mon, 07 May 2007 22:16:23 +0200

mån 2007-05-07 klockan 20:00 +0100 skrev Markus Moeller:
> I am trying to write my own authentication helper for the Negotiate
> authentication. I get as far as returning "AF blob username" back to
> squid
> but then authenticateNegotiateHandleReply crashes.

Where does it crash? Run Squid under GDB to find out.

> I looked at the source
> and wondering how it should work and wrote a small test program
> emulating
> the authenticateNegotiateHandleReply fucntion and it crashes at if
> (arg)
> *arg++ = '\0';

Your test program is not a valid test of the code..

   char *something = "some string";

allocates a read-only string. Your need

   char *something = strdup("some string");

to test proper.

The GCC flag -Wwrite-strings will warn you about this.

> How should the return value be formatted to make it work ??

Possible Negotiate helper responses:

Incremental negotiation:
TT blob

Successful authentication:
AF blob username

Failed authentication
NA blob Error message

Other failure
BH Error message

Regards
Henrik

Received on Mon May 07 2007 - 14:16:30 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 01 2007 - 12:00:04 MDT