summaryrefslogtreecommitdiff
path: root/debian/local/pam-auth-update
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2015-08-21 23:24:20 -0700
committerSteve Langasek <vorlon@debian.org>2019-01-08 22:12:12 -0800
commit96781d7129220a1bf284521a779de6b02b705cfb (patch)
tree1ff9e542a4bebcede87bfe1160a9853044534ea4 /debian/local/pam-auth-update
parentf97bd8799d7c811d50f57bf0677b24e0490ae5be (diff)
pam-auth-update: don't mishandle trailing whitespace in profiles.
LP: #1487103.
Diffstat (limited to 'debian/local/pam-auth-update')
-rw-r--r--debian/local/pam-auth-update3
1 files changed, 2 insertions, 1 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update
index 17d3fc66..60eb1e8f 100644
--- a/debian/local/pam-auth-update
+++ b/debian/local/pam-auth-update
@@ -671,7 +671,7 @@ sub parse_pam_profile
my %profile;
open(PROFILE, $profile) || die "could not read profile $profile: $!";
while (<PROFILE>) {
- if (/^(\S+):\s+(.*)$/) {
+ if (/^(\S+):\s+(.*)\s*$/) {
$fieldname = $1;
# compatibility with the first implementation round;
# "Auth-Final" is now just called "Auth"
@@ -686,6 +686,7 @@ sub parse_pam_profile
} else {
chomp;
s/^\s+//;
+ s/\s+$//;
$profile{$fieldname} .= "\n$_" if ($_);
$profile{$fieldname} =~ s/^[\n\s]+//;
}