Re: [SSSD] [PATCH] Fix client libs thread safety

2010-11-22 Thread Sumit Bose
On Sat, Nov 20, 2010 at 03:33:31PM -0500, Simo Sorce wrote: Had some spare time today and wanted to fix this issue. The attached patch instruments nss and pam clients to use a pthread mutex to prevent multiple threads from stomping on each other. The patch is quite simple and basic

Re: [SSSD] [PATCH] Fix client libs thread safety

2010-11-22 Thread Simo Sorce
On Mon, 22 Nov 2010 10:46:02 +0100 Sumit Bose sb...@redhat.com wrote: On Sat, Nov 20, 2010 at 03:33:31PM -0500, Simo Sorce wrote: Had some spare time today and wanted to fix this issue. The attached patch instruments nss and pam clients to use a pthread mutex to prevent multiple

Re: [SSSD] [PATCH] Fix client libs thread safety

2010-11-22 Thread Simo Sorce
On Mon, 22 Nov 2010 10:46:02 +0100 Sumit Bose sb...@redhat.com wrote: Protecting a whole PAM task like authentication with a mutex can lead to DOS situation when a user logs into a threaded application with his username but forgets to enter his password immediately because the phone is

Re: [SSSD] [PATCH] Fix client libs thread safety

2010-11-22 Thread Sumit Bose
On Mon, Nov 22, 2010 at 09:23:01AM -0500, Simo Sorce wrote: On Mon, 22 Nov 2010 10:46:02 +0100 Sumit Bose sb...@redhat.com wrote: Protecting a whole PAM task like authentication with a mutex can lead to DOS situation when a user logs into a threaded application with his username but

Re: [SSSD] [PATCH] Fix client libs thread safety

2010-11-22 Thread Simo Sorce
On Mon, 22 Nov 2010 17:25:38 +0100 Sumit Bose sb...@redhat.com wrote: On Mon, Nov 22, 2010 at 09:23:01AM -0500, Simo Sorce wrote: On Mon, 22 Nov 2010 10:46:02 +0100 Sumit Bose sb...@redhat.com wrote: Protecting a whole PAM task like authentication with a mutex can lead to DOS

[SSSD] [PATCH] Fix client libs thread safety

2010-11-20 Thread Simo Sorce
Had some spare time today and wanted to fix this issue. The attached patch instruments nss and pam clients to use a pthread mutex to prevent multiple threads from stomping on each other. The patch is quite simple and basic testing seem to show no issues. It may be worth of back-porting to older