Public bug reported:

$ lsb_release -rd
Description:    Ubuntu 18.04.2 LTS
Release:        18.04

$ LANG=C apt-cache policy systemd
systemd:
  Installed: 237-3ubuntu10.22
  Candidate: 237-3ubuntu10.22
  Version table:
 *** 237-3ubuntu10.22 500
        500 http://ch.archive.ubuntu.com/ubuntu bionic-updates/main amd64 
Packages
        100 /var/lib/dpkg/status
     237-3ubuntu10.19 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 
Packages
     237-3ubuntu10 500
        500 http://ch.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://mirrors.kernel.org/ubuntu bionic/main amd64 Packages


$ head -1 /etc/hosts
127.0.2.1 foo # bar

$ /usr/bin/systemd-resolve -4 bar

expected
----------
bar: resolve call failed: 'bar' not found

What happened instead
---------------------
bar: 127.0.2.1


HOSTS(5)  
> Text from a "#" character until the end of the line is a comment, and is 
> ignored.

This is fixed in upstream:
https://github.com/systemd/systemd/issues/10779
https://github.com/systemd/systemd/commit/bd0052777981044cf54a1e9d6e3acb1c3d813656

Please backport to current LTS version.
I accidentally connected to wrong systems because of this bug.

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: hosts systemd-resolve

** Summary changed:

- systemd-resolve not ignoring comments /etc/hosts
+ systemd-resolve not ignoring comments in /etc/hosts

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1832672

Title:
  systemd-resolve not ignoring comments in /etc/hosts

Status in systemd package in Ubuntu:
  New

Bug description:
  $ lsb_release -rd
  Description:  Ubuntu 18.04.2 LTS
  Release:      18.04

  $ LANG=C apt-cache policy systemd
  systemd:
    Installed: 237-3ubuntu10.22
    Candidate: 237-3ubuntu10.22
    Version table:
   *** 237-3ubuntu10.22 500
          500 http://ch.archive.ubuntu.com/ubuntu bionic-updates/main amd64 
Packages
          100 /var/lib/dpkg/status
       237-3ubuntu10.19 500
          500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 
Packages
       237-3ubuntu10 500
          500 http://ch.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
          500 http://mirrors.kernel.org/ubuntu bionic/main amd64 Packages

  
  $ head -1 /etc/hosts
  127.0.2.1 foo # bar

  $ /usr/bin/systemd-resolve -4 bar

  expected
  ----------
  bar: resolve call failed: 'bar' not found

  What happened instead
  ---------------------
  bar: 127.0.2.1


  HOSTS(5)  
  > Text from a "#" character until the end of the line is a comment, and is 
ignored.

  This is fixed in upstream:
  https://github.com/systemd/systemd/issues/10779
  
https://github.com/systemd/systemd/commit/bd0052777981044cf54a1e9d6e3acb1c3d813656

  Please backport to current LTS version.
  I accidentally connected to wrong systems because of this bug.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1832672/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to