Patch: idmap_script idmapping module

Richard Sharpe realrichardsharpe at gmail.com
Tue Nov 18 16:26:01 MST 2014


On Tue, Nov 18, 2014 at 2:02 PM, Michael Adam <obnox at samba.org> wrote:
> On 2014-11-18 at 13:56 -0800, Richard Sharpe wrote:
>> On Tue, Nov 18, 2014 at 1:54 PM, Michael Adam <obnox at samba.org> wrote:
>> > On 2014-11-18 at 21:36 +0000, Rowland Penny wrote:
>> >> On 18/11/14 21:31, Richard Sharpe wrote:
>> >> >On Tue, Nov 18, 2014 at 1:17 PM, Rowland Penny <repenny241155 at gmail.com> wrote:
>> >> >>On 18/11/14 20:53, Richard Sharpe wrote:
>> >> >>>Hi,
>> >> >>>
>> >> >>>Spurred on by Michael Adam's suggestion and a local need, I whipped
>> >> >>>this up from existing code.
>> >> >>>
>> >> >>>Comments welcome. Builds cleanly, now for some testing.
>> >> >>>
>> >> >>OK, I give in, just what does it do ?? :-)
>> >> >It does what the idmap_tdb2 with script module does but without the
>> >> >tdb stuff in there. It is simply for those who want a fixed mapping
>> >> >from SIDs to UIDs and they don't have such a mapping in LDAP or SFU or
>> >> >whatever.
>> >> >
>> >> >I just built it without change under Samba 3.6.x as well (after some
>> >> >Makefile magic.)
>> >> >
>> >> I think I understand, what you mean is that you can map the builtin
>> >> SID's to an ID number, similar to what happens in idmap.ldb.
>> >
>> > Not at all.
>> > It calls an external local program ("script") to retrieve the mapping
>> > instead of incrementing a counter in a database (idmap.ldb, and
>> > winbindd idmap backends tdb, tdb2, ldap) or calculating
>> > the mappings with an algorithm (rid and autorid backends)
>> >
>> > Just read the "IDMAP SCRIPT" section in the idmap_tdb2 manpage
>> > for the details on what Richard extracted from the tdb2 backend.
>>
>> You don't have to make it sound like I did so little work :-)
>
> Hey, I was not implying that it was little work!
> I was just pointing to an existing thorough description
> of the functionality. I did not quantify the work needed to
> extract it... :-)

I know, I was joking. It does need to have a man page ...

> I still need to look at the patch itself in detail and do tests.
> At first sight it looks good.

It actually also works on Samba 3.6.23 with no changes, which is a
large benefit for me at the moment.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list