[Samba4][Patch] Implement idmap for winbind (try 2)

Kai Blin kai at samba.org
Tue Feb 19 16:38:26 GMT 2008

On Tuesday 19 February 2008 17:25:59 Stefan (metze) Metzmacher wrote:
> Kai Blin schrieb:

> 1.) idmap_ctx should be long term hanging on struct wbsrv_service

Check. I'll look into that.

> 2.) the usage of tmp_ctx is useless as 'state' is already a context
>     with the correct scope.


> 3.) you should first try to do a ldb_search without a transaction
>     before the code you currently have:
>     - if we find the mapping we do a search and are done
>     - if we don't find a mapping we should start a transaction
>       and redo the seach to make sure no one else has added it
>       in between, then we should create a new mapping.

Ah, I didn't understand it when you tried to explain this in IRC. That makes 
more sense.

> 4.) the if (new_uid != low) logic breaks if
>     there's the highwater mark set and the value match the low
>     bound, you would end up with two values for the attribute...

You were the one who said I shouldn't set up the database like that in the 
first place so the code could just always go that path.

> 5.) please use hwm++; instead of ++hwm;

Sure, all the same on it's own.

> 6.) if you have a line break within a function call, indent the 2nd line
>     to the opening '(' and not just one \t.


> 7.) Doesn't simo proposed that we allocate uids and gids from the same
>     range. So that a number is never given away as uid and gid.

The way I understood simo, this was about using the same range for both uids 
and gids, but two pools of numbers. What would be the benefit of only using 
one pool?


Kai Blin
WorldForge developer  http://www.worldforge.org/
Wine developer        http://wiki.winehq.org/KaiBlin
Samba team member     http://www.samba.org/samba/team/
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.samba.org/archive/samba-technical/attachments/20080219/1daeb25d/attachment.bin

More information about the samba-technical mailing list