summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-08-23 20:09:24 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:28:27 -0800
commit11242b809f8084c58e7fc306c3edaf8781af6f18 (patch)
tree91c28680ab6c0538c9bbb8c0e07df0b3e1e94672 /debian
parentf8e72fcd1cf4c3136a6599d9cfc3d9292c04fb57 (diff)
never unlink the .pam-old file - just only create it if --force is set.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/local/pam-auth-update6
1 files changed, 1 insertions, 5 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update
index a1761908..2a8de8e8 100755
--- a/debian/local/pam-auth-update
+++ b/debian/local/pam-auth-update
@@ -397,15 +397,11 @@ sub write_profiles
# then do the renames, back-to-back
# we have to use system because File::Copy is in
# perl-modules, not perl-base
- # FIXME: if there was already a .pam-old file, and we're
- # going to unlink the old version afterwards, we've clobbered
- # the user's old version for no reason!
- if (-e "$target") {
+ if (-e "$target" && $force) {
system('cp','-f',$target,$target . '.pam-old');
}
rename($dest,$target);
rename("$savedir/$type.new","$savedir/$type");
- unlink($target . '.pam-old') if (!$force);
}
# at the end of a successful write, reset the 'seen' flag and the