[Samba4] Using existing samba3 data from an external LDAP with samba4

Martin Kühl kuehl at univention.de
Thu Nov 16 10:43:37 GMT 2006


Hi,

Am Mittwoch, 15. November 2006 04:54 schrieb Andrew Bartlett:
> On Tue, 2006-10-24 at 17:40 +0200, Martin Kühl wrote:
> > The following are notes I've taken while trying to connect a samba4
> > service
> > to the samba3 data contained in the LDAP directory of a UCS[1]
> > system.
>
> Thankyou very much for those notes.  I've been spending the last
> little while too deep in Kerberos land, but have just come up for
> air.
>
> I've been working to remove some of the issues I've seen in the
> ldb_map module.  In particular, I think I've improved the handling of
> the search mappings.  The aim is always to look from the local to
> remote names, so we can have multiple local attributes based on on
> remote attribute.

Three comments to that:
You changed `ldb_msg_el_merge' from returning 0 or -1 to returning 0 or 
LDB error codes.  I think you should return LDB_SUCCESS on success, 
just for consistency.

In `map_attrs_collect_and_partition' you now have two instances of the 
"/* Clear initial lists of partitioned attributes */" comment, but 
removed the statements that perform the clearing.  Maybe you want to 
remove those comments?

In `generate_primaryGroupID' you assign strrchr(sid, '-') to p but 
recalculate it later, you might say
    el->values[0].data = (uint8_t *)talloc_strdup(el->values, p+1);
instead

> I'm currently struggling with the samba3sam test.  It seems to me
> that it expects to be able to read and write both database views.  I
> think I need to restructure it to only ever write via the samba4 'way
> of seeing things'.

Yes, I wanted to test the case where you modify data in the mapped 
backend and want the changes to show up in the samba4 view.

> Did you redo the test script after you made your patch?  I am
> interested in applying them.

I didn't, they didn't meet all of my goals and several parts are 
probably too specific to what I tried to do.

I'll happily discuss what parts are worth ripping out though.

Cheers,
Martin

-- 
Martin Kühl		Entwicklung		 <kuehl at univention.de>
Univention GmbH		Linux for Your Business	 fon: +49 421 22 232-0
Mary-Somerville-Str. 1	28359 Bremen		 fax: +49 421 22 232-99
						 http://www.univention.de/



More information about the samba-technical mailing list