1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00
Simo Sorce 4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10 14:28:22 -05:00
..
2007-10-10 14:21:35 -05:00

This test code requires a tdb that is configured for to use the asq module.
You can do that adding the following record to a tdb:

dn: @MODULES
@LIST: asq

Other modules can be used as well (like rdn_name for example)

The uidNumber 0 and the gidNumber 0 are considered invalid.

The user records should contain the followin attributes:
uid (required)			the user name
userPassword (optional)		the user password (if not present "LDB" is
				returned in the password field)
uidNumber (required)		the user uid
gidNumber (required)		the user primary gid
gecos (optional)		the GECOS
homeDirectory (required)	the home directory
loginShell (required)		the login shell
memberOf (required)		all the groups the user is member of should
				be reported here using their DNs. The
				primary group as well.

The group accounts should contain the following attributes:
cn (required)			the group name
uesrPassword (optional)		the group password (if not present "LDB" is
				returned in the password field)
gidNumber (required)		the group gid
member (optional)		the DNs of the member users, also the ones
				that have this group as primary


SSS