|
From: Andrew H. <and...@ne...> - 2003-02-28 18:17:55
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
I discovered the following patch was necessary to get the passdelay feature
working while upgrading to the 1.070 version of webmin. <br>
<br>
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 <br>
"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.<br>
<br>
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.<br>
<br>
Here's the patch:<br>
<br>
--- webmin-1.070/miniserv.pl Mon Feb 24 12:22:31 2003<br>
+++ webmin/miniserv.pl Fri Feb 28 12:05:40 2003<br>
@@ -896,7 +896,7 @@<br>
<br>
if ($config{'passdelay'} && !$config{'inetd'}) {<br>
# check with main process for delay<br>
- print $PASSINw "delay $authuser $acptip $validated\n";<br>
+ printf $PASSINw "delay $authuser $acptip %d\n", $validated;<br>
<$PASSOUTr> =~ /(\d+) (\d+)/;<br>
$blocked = $2;<br>
sleep($1);<br>
@@ -926,7 +926,7 @@<br>
<br>
# check with main process for delay<br>
if ($config{'passdelay'} && $in{'user'}) {<br>
- print $PASSINw "delay $in{'user'} $acptip $ok\n";<br>
+ printf $PASSINw "delay $in{'user'} $acptip %d\n", $ok;<br>
<$PASSOUTr> =~ /(\d+) (\d+)/;<br>
$blocked = $2;<br>
sleep($1);<br>
<br>
<br>
<br>
Hope this helps someone else out. <br>
<br>
Thanks for your continued effort on this project, it is greatly appreciated!<br>
<br>
<br>
<div class="moz-signature">-- <br>
<strong>Andrew Hamlin</strong> <br>
<p><br>
</p>
<div></div>
</div>
</body>
</html>
|