New issue 180: pam authentication very slow + fix
https://bitbucket.org/conservancy/kallithea/issues/180/pam-authentication-very-slow-fix

Silas De Munck:

Using pam authentication with Mercurial over HTTP is very slow.

I think this is caused by the fact that mercurial always tries to perform an 
operation anonymously and after that, tries user authentication.

A simple 'hg pull', results in 4 calls to the pam module (slow) to authenticate 
user '' (empty string). The empty string also skips the cache in auth_pam.py.
I think the pam module should not call pam for an empty user?

FIX:
At the beginning of the auth(...) function in auth_pam.py add the following:


```
#!python

 # abort if empty username
        if not username:
            return None

```

Result: 'time hg pull'
Before: 17s
After: 3s





_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to