European Bob's Hula Hoopla!

Sat, 10 Sep 2005

Lost your password?

This works:

./mdbtool setpassword \\Tree\\Context\\Admin hula

Easier than felching around for the right file, and trying to encode things and stuff. Also, there's some source up here for now. It's not a patch to Hula, it should compile cleanly outside Hula.

Is an mdbtool possible?

We're getting to the point where the Debian packages of Hula are pretty keen, good enough for people to run, but I'm still worrying somewhat about ensuring people's configurations can be updated sanely. One part of this is reading/writing configuration via the MDB library rather than fiddling files directly - this will be particularly important if anyone starts to use (e.g.) mdb-odbc or another non-file driver.

However, there appear to be API problems which are stymying me somewhat. As an example; looking at some attributes:

$ ./mdbtool getattrs \\Tree\\Context\\Server netmail:messagingserver
netmail:messagingserver::es\Server Messaging Server

$ ./mdbtool addobject \\Tree\\Context\\test User Sname=foo

The first command is basically trying to get an attribute off the Server object - and we can see we get a response which appears to be forshortened. I cannot figure out why; it's just an MDBRead() call which gets immediately printed.

The second command tries to add an object called "test" to the tree, and set an attribute 'name' to the value 'foo'. But, we have to know whether it's a string or a DN, so you have to put S or D in front of the attribute name. Maybe you could figure it out from the schema - that would be nice, but I would think MDB would be perfectly capable of doing this itself. It seems a bizarre API :/

Other stuff has also come up. I want an import and export, so that (for example) someone can back up their configuration. This appears to be a no-go, though, because MDBEnumerateAttributesEx() is barely implemented. Without the introspection, it doesn't seem possible to dump stuff.

I'll put up some source at some point so others can have a play. It looks like it's going to be a fair amount more work before it's in a state to push into Hula..