Implementing a new auth mechanism
Havoc Pennington
hp at redhat.com
Fri Mar 9 07:32:29 PST 2007
Zeeshan Ali wrote:
>
> Unfortunately, it turned out to be not that simple and the client
> hangs after sending server the string: "AUTH CYRUS_SASL \r\n" . As an
> experiment, I replaced 'return TRUE' with 'return send_ok (auth);' in
> the server_data_func implementation of mine and now i get a segfault
> instead.
>
> Can anyone please provide me with some useful pointers?
>
We'd need more information (such as a backtrace from the segfault and a
copy of the patch you're using, at minimum). I think you'll have a lot
of small problems like this to debug though, so you may want to just
dive in ;-)
My suggestion would be to avoid working with full dbus for your testing
(i.e. don't try to test with dbus-send/dbus-daemon/etc.) - instead,
create either a unit test in dbus-auth.c (and temporarily move it to be
the first unit test run in 'make check' to save you time), or create a
small test program that you can run that just exercises the
authentication code. Within the dbus source tree, you can have a test
program that uses the internal dbus-auth API, instead of having to get
DBusConnection involved.
I'm sure an auth-only test case will save you a boatload of time as you
work on this, since it makes the code you're working with fundamentally
much smaller and simpler.
Havoc
More information about the dbus
mailing list