Package: libpam-runtime
Version: 1.1.8-3.3
Severity: normal
Tags: patch

Dear Maintainer,

% /usr/sbin/pam_getenv foo   
Unescaped left brace in regex is deprecated, passed through in regex; marked by 
<-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
% /usr/sbin/pam_getenv-patched foo 
% diff -u /usr/sbin/pam_getenv /usr/sbin/pam_getenv-patched
--- /usr/sbin/pam_getenv        2016-05-18 02:19:59.000000000 +0200
+++ /usr/sbin/pam_getenv-patched        2016-09-18 21:26:13.747245752 +0200
@@ -75,7 +75,7 @@
   my ($val) = @_;
 return undef unless $val;
        die "Cannot handle PAM items\n" if /(?<!\\)\@/;
-  $val =~ s/(?<!\\)\${([^}]+)}/$ENV{$1}||""/eg;
+  $val =~ s/(?<!\\)\$\{([^}]+)}/$ENV{$1}||""/eg;
   return $val;

The lines above show that /usr/sbin/pam_getenv issues a warning from perl.

With my patched version the warning is fixed.

The diff showing what my patch did. The patch is backwards compatible to any 
perl. My perl is:

% dpkg -l perl                                                      
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
ii  perl                5.22.2-5       amd64          Larry Wall's Practical 
Extraction and Repor

On my system I saw this warning during the installation of postgresql-9.5.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libpam-runtime depends on:
ii  debconf [debconf-2.0]  1.5.59
ii  libpam-modules         1.1.8-3.3

libpam-runtime recommends no packages.

libpam-runtime suggests no packages.

-- debconf information:
  libpam-runtime/profiles: unix, systemd
  libpam-runtime/override: false

Reply via email to