I believe this fixes ANONYMOUS SASL authentication when using gsasl.
The problem was that we were calling gsasl_step() with an empty
input string, but the first step of ANONYMOUS SASL login requires
an arbitrary token. I think the token is just any random string
that can optionally be used to track the user.
In our case we call the ctx->cb with "sx_sasl_cb_GEN_AUTHZID" as
the type. This causes c2s to generate a random node that can be
used for this user. It looked like this is what the cyrus and
sasl code do. I was only able to test this a little... by
hacking some SASL ANONYMOUS support into Pidgin.
Does anyone know of a jabber client with SASL anonymous support?