Comment 16 for bug 11626

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 8 Jan 2005 14:59:45 +0100
From: Frank Lichtenheld <email address hidden>
To: Thomas Hood <email address hidden>, <email address hidden>
Subject: Re: Bug#288481: if there is nothing, you might as well close it

--H8ygTp4AXg6deix2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jan 05, 2005 at 03:28:42PM +0100, Thomas Hood wrote:
> I have found the culprit: webmin-wvdial. The evil code is
> in /usr/share/webmin/wvdial/ppp-client-lib.pl:
[...]
> 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.
>
> This whole "feature" should be commented out.

I'm currently preparing a QA upload for the orphaned webmin-optional
package. Could you please take a look at the attached patch andtell
if you would consider it sufficient? I tried to take a less invasive
approach than completly removing the code since I don't want to
introduce too great change in behaviour in a QA upload.

Gruesse,
--
Frank Lichtenheld <email address hidden>
www: http://www.djpig.de/

--H8ygTp4AXg6deix2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="webmin-optional.288481.patch"

diff -Naur webmin-optional-1.160.bak/debian/changelog webmin-optional-1.160/debian/changelog
--- webmin-optional-1.160.bak/debian/changelog 2005-01-08 14:08:32.000000000 +0100
+++ webmin-optional-1.160/debian/changelog 2005-01-08 14:59:35.000000000 +0100
@@ -1,3 +1,19 @@
+webmin-optional (1.160-3) unstable; urgency=medium
+
+ * QA Upload
+ * webmin-wvdial: don't attempt to overwrite resolv.conf if it
+ is a symlink since this could break in many situations
+ (like when using resolvconf) (Closes: #288481) Also don't
+ attempt to delete the ppp specific resolv.conf, this isn't
+ our business. Pointed out by Thomas Hood.
+ * webmin-dhcpd: change dhcp-server to dhcp3-server in depends,
+ the former isn't available anymore (Closes: #260608)
+ * webmin-mysql: allow virtual-mysql-client as an alternative
+ to mysql-client as dependency. This allows to use mysql-client-4.1.
+ (Closes: #287128)
+
+ -- Frank Lichtenheld <email address hidden> Sat, 8 Jan 2005 14:47:01 +0100
+
 webmin-optional (1.160-2) unstable; urgency=high

   * I'm not here. This isn't happening.
diff -Naur webmin-optional-1.160.bak/debian/control webmin-optional-1.160/debian/control
--- webmin-optional-1.160.bak/debian/control 2005-01-08 14:08:32.000000000 +0100
+++ webmin-optional-1.160/debian/control 2005-01-08 14:30:03.000000000 +0100
@@ -49,7 +49,7 @@
 Package: webmin-dhcpd
 Architecture: all
 Priority: optional
-Depends: webmin (>= 1.140), ${perl:Depends}, dhcp | dhcp-server
+Depends: webmin (>= 1.140), ${perl:Depends}, dhcp | dhcp3-server
 Description: dhcpd control module for webmin
  This module allows webmin (a web-based interface for system administration
  for Unix) to manage subnets, hosts and groups for the ISC dhcpd(8) server
@@ -155,7 +155,7 @@
 Package: webmin-mysql
 Architecture: all
 Priority: optional
-Depends: webmin (>= 1.140), ${perl:Depends}, mysql-client
+Depends: webmin (>= 1.140), ${perl:Depends}, mysql-client | virtual-mysql-client
 Recommends: mysql-server
 Description: mysql-server control module for webmin
  This module allows webmin (a web-based interface for system administration
diff -Naur webmin-optional-1.160.bak/wvdial/ppp-client-lib.pl webmin-optional-1.160/wvdial/ppp-client-lib.pl
--- webmin-optional-1.160.bak/wvdial/ppp-client-lib.pl 2004-09-05 12:12:07.000000000 +0200
+++ webmin-optional-1.160/wvdial/ppp-client-lib.pl 2005-01-08 14:54:07.000000000 +0100
@@ -276,10 +276,12 @@
     }
    last;
    }
- if ($pst[9] >= $stime) {
+ # do not attempt to overwrite resolv.conf if it
+ # is a symlink since it is difficult to guess
+ # what is the right thing to do then
+ if (!-l $resolv_conf && ($pst[9] >= $stime)) {
    # 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");
    if ($_[1] == 0) {
@@ -350,7 +352,6 @@
    print "$text{'disc_dns'}\n\n";
    }
   }
- &system_logged("rm -f $ppp_resolv_conf");
  return 1;
  }
 else {

--H8ygTp4AXg6deix2--