diff options
author | Niels Thykier <niels@thykier.net> | 2018-08-11 15:31:24 +0000 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 22:12:42 -0800 |
commit | c5a761b3f0216bc80685da0026ba7e1210b46004 (patch) | |
tree | e0565860842e57ceb47ab30e36c0b4325f1ff346 /debian/local | |
parent | 6a2e700e36a7547987b9c0a69bce5fbf77a17049 (diff) | |
download | pam-c5a761b3f0216bc80685da0026ba7e1210b46004.tar.gz pam-c5a761b3f0216bc80685da0026ba7e1210b46004.tar.bz2 pam-c5a761b3f0216bc80685da0026ba7e1210b46004.zip |
Import Debian changes 1.1.8-3.8
pam (1.1.8-3.8) unstable; urgency=medium
* Non-maintainer upload.
* Set Rules-Requires-Root to binary-targets as pam relies on
chgrp in debian/rules.
* Update pam-auth-update to detect write errors and properly
fail when that happens. (Closes: #880501)
* Remove Roger Leigh from uploaders as he has restired from
Debian. (Closes: #869348)
* Reduce priority of libpam0g to optional.
* Rebuild with a recent version of dpkg-source, which ensures
that the Build-Depends are correct in the .dsc file.
(Closes: #890602)
* Apply patch from Felix Lechner to make pam-auth-update ignore
editor backup files. (Closes: #519361)
* Apply update to Brazilian Portuguese translations of the
debconf templates. Thanks to Adriano Rafael Gomes.
(Closes: #799417)
Diffstat (limited to 'debian/local')
-rw-r--r-- | debian/local/pam-auth-update | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 5fb4f40a..6d17ab72 100644 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -62,7 +62,7 @@ my %md5sums = ( opendir(DIR, $inputdir) || die "could not open config directory: $!"; while (my $profile = readdir(DIR)) { - next if ($profile eq '.' || $profile eq '..'); + next if ($profile eq '.' || $profile eq '..' || $profile =~ m/~$/ || $profile =~ m/^#.+#$/); %{$profiles{$profile}} = parse_pam_profile($inputdir . '/' . $profile); } closedir DIR; @@ -126,7 +126,7 @@ if ($diff) { # find out what we've seen, so we can ignore those defaults my %seen; if (-e $savedir . '/seen') { - open(SEEN,$savedir . '/seen'); + open(SEEN,$savedir . '/seen') or die("open(${savedir}/seen) failed: $!"); while (<SEEN>) { chomp; $seen{$_} = 1; @@ -229,11 +229,11 @@ do { # the decision has been made about what configs to use, so even if # something fails after this, we shouldn't go munging the default # options again. Save the list of known configs to /var/lib/pam. -open(SEEN,"> $savedir/seen"); +open(SEEN,"> $savedir/seen") or die("open(${savedir}/seen) failed: $!"); for my $i (@sorted) { print SEEN "$i\n"; } -close(SEEN); +close(SEEN) or die("close(${savedir}/seen) failed: $!"); # @enabled now contains our list of profiles to use for piecing together # a config @@ -383,7 +383,7 @@ sub create_from_template } } close(INPUT); - close(OUTPUT); + close(OUTPUT) or die("close($dest) failed: $!"); if ($state < 4) { unlink($dest); @@ -536,16 +536,19 @@ sub write_profiles } } - close(OUTPUT); + close(OUTPUT) or die("close($dest) failed: $!"); # then do the renames, back-to-back # we have to use system because File::Copy is in # perl-modules, not perl-base - if (-e "$target" && $force) { - system('cp','-f',$target,$target . '.pam-old'); + if (-e $target && $force) { + system('cp','-f',$target,$target . '.pam-old') == 0 + or die("cp -f ${target} ${target}.pam.old failed"); } - rename($dest,$target); - rename("$savedir/$type.new","$savedir/$type"); + rename($dest,$target) + or die("rename($dest, $target) failed: $!"); + rename("$savedir/${type}.new","$savedir/$type") + or die("rename(${savedir}/${type}.new, ${savedir}/${type}) failed: $!"); } # at the end of a successful write, reset the 'seen' flag and the |