Public bug reported:

Since PAM 1.4.x, pam_env's behaviour has silently changed and now it
fails to parse/doesn't accept /etc/environment files that don't end with
a newline.

It's easy to reproduce:

$ lxc launch ubuntu-daily:jammy pam-env-test --vm
$ lxc shell pam-env-test
# # Note that pam-1.4.x is currently in jammy-proposed as I write this bug.
# cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted 
main multiverse universe
EOF
# apt update
# apt install libpam-modules libpam-runtime libpam-systemd -y
# reboot
$ lxc shell pam-env-test
# apt policy libpam-modules
libpam-modules:
  Installed: 1.4.0-10ubuntu1
  Candidate: 1.4.0-10ubuntu1
  Version table:
 *** 1.4.0-10ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
# echo 'http_proxy=http://invalid.address/' >> /etc/environment
# printf 'no_proxy=gnu.org' >> /etc/environment
# su -
# curl gnu.org
curl: (5) Could not resolve proxy: invalid.address


The right output should have been similar to:

# curl gnu.org
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.gnu.org/";>here</a>.</p>
<hr>
<address>Apache/2.4.29 Server at gnu.org Port 80</address>
</body></html>


This bug has impacted autopkgtest.u.c; see the following MP:

https://code.launchpad.net/~sergiodj/autopkgtest/+git/development/+merge/412771

** Affects: pam (Ubuntu)
     Importance: High
         Status: Confirmed

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

Title:
  pam_env doesn't accept /etc/environment files that don't end with
  newline anymore (PAM 1.4.x behaviour change/regression)

Status in pam package in Ubuntu:
  Confirmed

Bug description:
  Since PAM 1.4.x, pam_env's behaviour has silently changed and now it
  fails to parse/doesn't accept /etc/environment files that don't end
  with a newline.

  It's easy to reproduce:

  $ lxc launch ubuntu-daily:jammy pam-env-test --vm
  $ lxc shell pam-env-test
  # # Note that pam-1.4.x is currently in jammy-proposed as I write this bug.
  # cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
  # Enable Ubuntu proposed archive
  deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted 
main multiverse universe
  EOF
  # apt update
  # apt install libpam-modules libpam-runtime libpam-systemd -y
  # reboot
  $ lxc shell pam-env-test
  # apt policy libpam-modules
  libpam-modules:
    Installed: 1.4.0-10ubuntu1
    Candidate: 1.4.0-10ubuntu1
    Version table:
   *** 1.4.0-10ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 
Packages
          100 /var/lib/dpkg/status
  # echo 'http_proxy=http://invalid.address/' >> /etc/environment
  # printf 'no_proxy=gnu.org' >> /etc/environment
  # su -
  # curl gnu.org
  curl: (5) Could not resolve proxy: invalid.address

  
  The right output should have been similar to:

  # curl gnu.org
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  <html><head>
  <title>301 Moved Permanently</title>
  </head><body>
  <h1>Moved Permanently</h1>
  <p>The document has moved <a href="http://www.gnu.org/";>here</a>.</p>
  <hr>
  <address>Apache/2.4.29 Server at gnu.org Port 80</address>
  </body></html>

  
  This bug has impacted autopkgtest.u.c; see the following MP:

  
https://code.launchpad.net/~sergiodj/autopkgtest/+git/development/+merge/412771

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pam/+bug/1953201/+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