Hi Ludovic,

sorry to bother you again... I've forgotten one line in my patch :-/
Could you please also add the included patch?

Just to let you know: I've another patch pending. This will add 
more error messages presented to  the users. We have this working
for a long time and it really improved our error handling on side
of our helpdesk staff. I'm on my way to make it match the current
trunk version.

Thanks!
Dominik Fischer

Index: src/mappers/pwent_mapper.c
===================================================================
--- src/mappers/pwent_mapper.c  (Revision 489)
+++ src/mappers/pwent_mapper.c  (Arbeitskopie)
@@ -83,6 +83,7 @@
                    DBG1("Entry for %s not found (direct).", (const char *) 
str);
                 } else {
                        DBG1("Found CN in pw database for user %s (direct).", 
(const char *) str);
+                       *match = 1;
                        return pw->pw_name;
                }
        }



Am 20.03.2011 um 12:06 schrieb Ludovic Rousseau:

> 2011/3/19 Dominik Fischer <dom_fisc...@web.de>:
>> Hello!
>> 
>> pwent_mapper_find_user() searches through all available passwd db entries to 
>> find an user.
>> This takes a very long time, if you have many users (10000). Additionally, 
>> if you have nss-ldap
>> configured, it transfers a large amount of data (which is expensive on 
>> mobile connections...).
>> 
>> Included you find a patch to speed up user finding for the pwent_mapper. It 
>> first tries to find a user
>> directly by calling getpwnam() with the found CN. If this fails, the old 
>> mechanism is used.
>> (I think the second step could probably even be removed: I can't find a 
>> situation where the getpwnam()
>> does not work.)
>> 
>> Please have a look at the patch. If it's OK please include it in further 
>> pam_pkcs11 releases (so I
>> don't have to patch every new pam_pkcs11 release on my own ;-) ).
>> 
>> Kind regards
>> Dominik Fischer
> 
> Applied in revision 489
> 
> Thanks
> 
> -- 
>  Dr. Ludovic Rousseau

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to