From: Jamie C. <jca...@we...> - 2003-03-01 00:40:00
|
Thanks for the fix! .. I will include something equivalent in the next webmin release. - Jamie Andrew Hamlin wrote: > I discovered the following patch was necessary to get the passdelay > feature working while upgrading to the 1.070 version of webmin. > > The miniserv.pl program was closing the socket on my client browser > everytime I entered a bad password for my test user. I found that the > validate_user method returned 0 which was sent to the parent process in > a double-quoted string > "delay $user $address $ok" which was received as "delay admin > ip.addr.ess ". The $ok value of zero of course disappeared when cast to > a string. > > I have not tried this option in earlier releases so this problem may > have been around for a while? The history doesn't really concern me but, > to bring an end to my rambling, I'm running webmin 1.070 on a Linux box > using an old build of perl. version 5.005_03 on a Red Hat 6.2 box. That > may have something to do with why it wasn't working for me -- haven't > researched that far. > > Here's the patch: > > --- webmin-1.070/miniserv.pl Mon Feb 24 12:22:31 2003 > +++ webmin/miniserv.pl Fri Feb 28 12:05:40 2003 > @@ -896,7 +896,7 @@ > > if ($config{'passdelay'} && !$config{'inetd'}) { > # check with main process for delay > - print $PASSINw "delay $authuser $acptip $validated\n"; > + printf $PASSINw "delay $authuser $acptip %d\n", $validated; > <$PASSOUTr> =~ /(\d+) (\d+)/; > $blocked = $2; > sleep($1); > @@ -926,7 +926,7 @@ > > # check with main process for delay > if ($config{'passdelay'} && $in{'user'}) { > - print $PASSINw "delay $in{'user'} $acptip $ok\n"; > + printf $PASSINw "delay $in{'user'} $acptip %d\n", $ok; > <$PASSOUTr> =~ /(\d+) (\d+)/; > $blocked = $2; > sleep($1); > > > > Hope this helps someone else out. > > Thanks for your continued effort on this project, it is greatly appreciated! |