<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:12px"><div dir="ltr" id="yui_3_16_0_1_1419230579287_2603"><span>Hello Tomas,</span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>Really appreciate for your quick response on this. I am seeing this behavior on default login service which come with RHEL 6.x installation. I have not modified the same.</span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>Below is the configuration for same.</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span></span></div><div id="yui_3_16_0_1_1419230579287_2602"> </div><div id="yui_3_16_0_1_1419230579287_2601" class="signature"><div id="yui_3_16_0_1_1419230579287_2600" dir="ltr" style="MARGIN-RIGHT:0px;FONT-FAMILY:verdana, helvetica, sans-serif;" align="left"><span style="" lang="en-us"><font face="Verdana" size="1" color="#808080"><b><br>Thanks & Regards,</b></font></span><span id="yui_3_16_0_1_1419230579287_2599" lang="en-us"><font face="Verdana"> <br></font><b><font face="Verdana" size="1" color="#0000ff">MINAL PATIL</font></b><font face="Verdana"><br></font><b id="yui_3_16_0_1_1419230579287_2598"><font id="yui_3_16_0_1_1419230579287_2597" face="Verdana" size="1" color="#9d9d9d">Pune | Mobile : +91 7350014029 | Mail : minalkpatil9@yahoo.com</font></b></span></div></div><br>  <div id="yui_3_16_0_1_1419230579287_2539" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 12px;"> <div id="yui_3_16_0_1_1419230579287_2538" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 12px;"> <div id="yui_3_16_0_1_1419230579287_2537" dir="ltr"> <hr id="yui_3_16_0_1_1419230579287_2696" size="1">  <font id="yui_3_16_0_1_1419230579287_2536" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Tomas Mraz <tmraz@redhat.com><br> <b><span style="font-weight: bold;">To:</span></b> Minal Patil <minalk.patil@yahoo.com>; Pluggable Authentication Modules <pam-list@redhat.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 19 December 2014 5:01 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: delay observed in pam_authenticate when called multiple times.<br> </font> </div> <div id="yui_3_16_0_1_1419230579287_2607" class="y_msg_container"><br>On Pá, 2014-12-19 at 09:06 +0000, Minal Patil wrote:<div class="qtdSeparateBR"><br><br></div><div class="yqt9960173021" id="yqtfd56392"><br clear="none">> Hello Sir/Madam,<br clear="none">> I am working on a PAM authentication module where i am seeing delay in pam_authenticate when called in sucessive manner.Below is my PAM function call sequence.<br clear="none">> pam_start()<br clear="none">> ...<br clear="none">> 1. pam_authenticate()<br clear="none">> 2. pam_authenticate()<br clear="none">> 3. pam_authenticate()<br clear="none">> <br clear="none">> 4. pam_authenticate()<br clear="none">> <br clear="none">> ....<br clear="none">> <br clear="none">> 1000.pam_authenticate()<br clear="none">> ....<br clear="none">> pam_end()<br clear="none">> <br clear="none">> It is observed that the first pam_authenticate responds with 40 ms. The response time goes up with every subsequent pam_authenticate call. for 1000 the call the response time is observed to be 2 seconds.<br clear="none">> <br clear="none">> Below are my system details:<br clear="none">> <br clear="none">> [<a shape="rect" ymailto="mailto:myuser@myhost" href="mailto:myuser@myhost">myuser@myhost</a> workdir]$ ls -l /lib/libpam*<br clear="none">> lrwxrwxrwx. 1 root root    17 Oct 18  2013 /lib/libpamc.so.0 -> libpamc.so.0.82.1<br clear="none">> -rwxr-xr-x. 1 root root 13764 Oct 15  2012 /lib/libpamc.so.0.82.1<br clear="none">> lrwxrwxrwx. 1 root root    21 Oct 18  2013 /lib/libpam_misc.so.0 -> libpam_misc.so.0.82.0<br clear="none">> -rwxr-xr-x. 1 root root 11460 Oct 15  2012 /lib/libpam_misc.so.0.82.0<br clear="none">> lrwxrwxrwx. 1 root root    16 Oct 18  2013 /lib/libpam.so.0 -> libpam.so.0.82.2<br clear="none">> -rwxr-xr-x. 1 root root 52540 Oct 15  2012 /lib/libpam.so.0.82.2<br clear="none">> [<a shape="rect" ymailto="mailto:myuser@myhost" href="mailto:myuser@myhost">myuser@myhost</a> workdir]$ uname -a<br clear="none">> Linux myhost 2.6.32-358.18.1.el6.i686 #1 SMP Fri Aug 2 17:10:27 EDT 2013 i686 i686 i386 GNU/Linux<br clear="none">> [<a shape="rect" ymailto="mailto:myuser@myhost" href="mailto:myuser@myhost">myuser@myhost</a> workdir]$ cat /etc/redhat-release<br clear="none">> Red Hat Enterprise Linux Server release 6.4 (Santiago)<br clear="none">> <br clear="none">> I have observed the same behavior on RHEL 6.2 as well. </div><br clear="none">> <a id="yui_3_16_0_1_1419230579287_2689" shape="rect" href="https://www.redhat.com/mailman/listinfo/pam-list" target="_blank">https://www.redhat.com/mailman/listinfo/pam-list</a><br clear="none"><br clear="none">Which PAM modules do you have configured in the PAM stack? Do you<br clear="none">observe the same behavior even with PAM stack containing a single:<br clear="none"><br clear="none">auth required pam_permit.so<br clear="none"><br clear="none">If not, you have to find out which PAM module causes the delay although<br clear="none">I suppose this can be multiple modules as PAM stack was not designed to<br clear="none">operate this way. You should always call pam_start() pam_authenticate()<br clear="none">and pam_end().<br clear="none"><br clear="none">-- <br clear="none">Tomas Mraz<br clear="none">No matter how far down the wrong road you've gone, turn back.<br clear="none">                                              Turkish proverb<br clear="none">(You'll never know whether the road is wrong though.)<div class="yqt9960173021" id="yqtfd48520"><br clear="none"><br clear="none"><br clear="none"></div><br><br></div> </div> </div>  </div></body></html>