On Wed, 2005-01-05 at 11:56 +0100, Malte Schmidt-Tychsen wrote:
> maybe I will try to reproduce it today. I used webmin-wvdial and the bug
> could be located anywhere. webmin-wvdial, wvdial, ppp-tools, ifplugd ...
I have found the culprit: webmin-wvdial. The evil code is
in /usr/share/webmin/wvdial/ppp-client-lib.pl:
$resolv_conf = "/etc/resolv.conf";
$ppp_resolv_conf = "/etc/ppp/resolv.conf";
$save_resolv_conf = $resolv_conf.".save";
[...]
if ($connected && $autodns) {
# If the resolv.conf file has not been modified, and the PPP
# resolv.conf has, copy it into place
[...] # A PPP DNS config has been created .. use it &system_logged("cp $resolv_conf $save_resolv_conf") if (!-l $resolv_conf); unlink($resolv_conf); &system_logged("cp $ppp_resolv_conf $resolv_conf");
[...]
sub ppp_disconnect
{
[...]
# Restore the saved DNS config file, if it hasn't been done
[...]
if (!-l $resolv_conf && $ost[9] < time()-5 && -r $save_resolv_conf) { &system_logged("mv $save_resolv_conf $resolv_conf");
if ($_[1] == 0) { print "$text{'disc_dns'}<p>\n"; } elsif ($_[1] == 1) { print "$text{'disc_dns'}\n\n"; }
} &system_logged("rm -f $ppp_resolv_conf"); return 1;
}
[...]
}
I don't know why webmin-wvdial tries to do this. If the user
wants /etc/resolv.conf to be a copy of /etc/ppp/resolv.conf then she can
simply make the former a symlink to the latter.
More relevant to you and me, this code isn't compatible with resolvconf
which requires that /etc/resolv.conf remain a symlink
to /etc/resolvconf/run/resolv.conf.
Furthermore, the code is buggy. If /etc/resolv.conf is originally a
symlink then it won't be restored as a symlink. If /etc/ppp/resolv.conf
is originally a symlink then this code will delete it.
reassign 288481 webmin-wvdial
thanks
On Wed, 2005-01-05 at 11:56 +0100, Malte Schmidt-Tychsen wrote:
> maybe I will try to reproduce it today. I used webmin-wvdial and the bug
> could be located anywhere. webmin-wvdial, wvdial, ppp-tools, ifplugd ...
I have found the culprit: webmin-wvdial. The evil code is webmin/ wvdial/ ppp-client- lib.pl:
in /usr/share/
$resolv_conf = "/etc/resolv.conf"; resolv_ conf = "/etc/ppp/ resolv. conf"; resolv_ conf = $resolv_ conf.". save";
# A PPP DNS config has been created .. use it
&system_ logged( "cp $resolv_conf $save_resolv_conf")
if (!-l $resolv_conf);
unlink( $resolv_ conf);
&system_ logged( "cp $ppp_resolv_conf $resolv_conf");
&system_ logged( "mv $save_resolv_conf $resolv_conf");
print "$text{ 'disc_dns' }<p>\n" ;
}
elsif ($_[1] == 1) {
print "$text{ 'disc_dns' }\n\n";
}
&system_ logged( "rm -f $ppp_resolv_conf");
return 1;
$ppp_
$save_
[...]
if ($connected && $autodns) {
# If the resolv.conf file has not been modified, and the PPP
# resolv.conf has, copy it into place
[...]
[...]
sub ppp_disconnect
{
[...]
# Restore the saved DNS config file, if it hasn't been done
[...]
if (!-l $resolv_conf && $ost[9] < time()-5 && -r $save_resolv_conf) {
if ($_[1] == 0) {
}
}
[...]
}
I don't know why webmin-wvdial tries to do this. If the user resolv. conf then she can
wants /etc/resolv.conf to be a copy of /etc/ppp/
simply make the former a symlink to the latter.
More relevant to you and me, this code isn't compatible with resolvconf /run/resolv. conf.
which requires that /etc/resolv.conf remain a symlink
to /etc/resolvconf
Furthermore, the code is buggy. If /etc/resolv.conf is originally a resolv. conf
symlink then it won't be restored as a symlink. If /etc/ppp/
is originally a symlink then this code will delete it.
This whole "feature" should be commented out.
--
Thomas Hood <email address hidden>