Vlad Georgescu wrote:
> Properly implementing SASL support in Subversion will require some refactoring:
>
> * On the client side:
> Authentication is performed by the following functions in
> subversion/libsvn_ra_svn/client.c : find_mech, auth_response,
> read_success, do_auth. (There's also handle_auth_request, but it only
> checks to see if the mechansm list is non-empty and then calls
> do_auth).
>
> Basically I want to extract these functions from client.c and put them
> in another file (say, "old_auth.c"). The entry point for
> authentication would be do_auth. I would then create a new file
> "sasl_auth.c" that also exports do_auth but does authentication
> through Cyrus SASL.
>
> The idea is to conditionally compile and link only one of those files
> depending on whether or not SASL is present on the system.
Uh, normally we just create an interface and have both implement it, so
that conditional compilation only changes whether we have a given
interface provider available.
Then you can just choose from the available ones at runtime.
This scheme has worked well for everything else we've done (fs backends,
ra layer implementations, etc). Why should this be different?
--Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 5 04:14:36 2006