samr conversion finished!

Luke Kenneth Casson Leighton lkcl at
Sun Jan 30 23:40:48 GMT 2000

ok, it's done!  untested, of course, except for a few minor bits / pieces.

you will need to write slightly more advanced versions of
set_policy_samr_sid() and get_policy_samr_sid(), you will need something
like this:


where lda_struct_info is this:

	LDAP_DB_HND *hnd;
	DOM_SID sid;

and anything else you are going to need.

the 3rd argument to set_policy_state() needs to be your own free routine,
see free_policy_con(0 in rpc_client/cli_connect.c for an appropriate
example, you will need to call:

ldi = (ldap_struct_info*) dev;
if (ldi->hnd != NULL)

basically that's it.

then, when someone does samr_close(), the handle will be automatically
closed and the close_lda_db_hnd() will get called.

when you do a samr_open_user(), you _create_ the ldap handle, create the
SID, set them in the lda_struct_info and then call

in, say, your samr_query_user_info() call, yuo do this:


then you do your ldap-related lda_get_user_info21(ldap_struct->hnd, ...)
and that's it!

it's pretty trivial, and a _lot_ cleaner than the stupid mess there at the

do you want to wait until i write samr tdb, or are you going to stick with
passdb/*.c groupdb/*.c like you [sensibly] keep telling me?



More information about the samba-technical mailing list