Programmer error! Bad Admin server handle

Torsten Kurbad kerberos at
Thu Feb 14 06:54:32 EST 2008


> I'd say that your pointer usage is totally wrong here and this should
> look like
> void *handle;
> // ...
> code = kadm5_init_with_password(client, pass, KADM5_ADMIN_SERVICE,
>                  realm, KADM5_STRUCT_VERSION_1, KADM5_API_VERSION_1,
>                  &handle);
> // ...
> kadm5_get_principals(handle, "*", princs, count);

I see your point. Anyway, the above doesn't work either, while -Wall
doesn't have any complaints at compile time.

> [...] you really should have
> another look at some C book to get it right. 

Can you recommend a good one?

> PS: You might want have a look at my code at
> which does basically the same thing for php.

Very interesting. As I see it, you store the handle in an attribute of
a previously generated Zend object. Maybe I should try to do the same
using a PyCObject, that has the charme of being exportable to Python.

Best regards,
  Smoking is the leading cause of statistics.

More information about the krbdev mailing list