[PATCH] rid allocator in passdb backend

Stefan (metze) Metzmacher metze at metzemix.de
Fri Oct 18 05:37:00 GMT 2002


At 20:26 17.10.2002 +0200, Volker.Lendecke at SerNet.DE wrote:
>Hi!
>
>
>This patch puts a RID allocator into the passdb backend. The outside interface
>are two calls.
>
>
>pdb_max_used_rid is for net rpc vampire to set the maximum RID that the PDC
>gave us.
>
>
>pdb_allocate_rid_for_gid allocates a new RID for the given unix group id. The
>passdb backend must allocate RIDs for users itself. The group mapping code
>should be able to get a new RID. The unix gid is handed to the pdb backend for
>smbpasswd an unixsam to be able to use the algorithmic mapping.
>
>
>The interface is definitely not the last word, as the group mapping might one
>day be moved into the passdb backend.
>
>
>One interesting part here might be the LDAP schema change which is to be
>discussed.
>
>
>The LDAP routines themselves quite reliably do an atomic set and increment. I
>tested it with my laptop and 100 (really) concurrent pdbedit processes beating
>the OpenLDAP 2.0.12. The random function in the sleep should probably done
>differently. On my machine 100 concurrent processes can quite reliably get
>their RID with a modulo of 200, 200 processes need more. But this is a bit
>extreme load. At least I never got corruption.
>
>
>The tdb backend could handle a load of 500 with no problem at all.

Patch looks good :-)

It would be nice to update the samba.schema only once, so we should now 
also add
the account policy values, etc ... to sambaDomainInfo (all stuff we'll 
later use for the SAM system)
Also add sambaGroup now, would be nice.(with the stuff we'll later use)
And changing a few attributes from ascii-string to directory-string, so 
that we can support utf-8 strings.

I think it's better if admins should only update the schema once!



metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de>




More information about the samba-technical mailing list