get_domain_user_groups() improvement.

Igor Belyi sambauser at katehok.ac93.org
Thu Sep 23 00:12:54 GMT 2004


Hi,

I have the following patch which improves performance of 
get_domain_user_groups() function with LDAP backend by asking LDAP for 
only groups user belong to instead of for all groups.

This patch adds a new method to pdb_methods and pdb_context structures 
named enum_user_groups(). It is used basically the same way as 
enum_group_mapping() method except that there's an extra SAM_ACCOUNT 
argument which helps LDAP backend to use a better filter during LDAP 
request.

I've tested it in my environment and at least it didn't break login into 
my PDC/LDAP Samba and groups user belongs to are listed correctly.

I confess, I didn't test them with smbpasswd or tdbsam backends but 
changes in mapping.c are small enought (from my point of view) to have 
my confidence without testing.

It was made on top of Samba 3.0.7.

Let me know what you think.
Cheers,
Igor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-3.0.7-enum_user_groups.patch
Type: text/x-patch
Size: 13323 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040922/0827a89c/samba-3.0.7-enum_user_groups.bin


More information about the samba-technical mailing list