diff options
author | Steve Langasek <vorlon@debian.org> | 2008-08-23 20:09:24 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 17:28:27 -0800 |
commit | 11242b809f8084c58e7fc306c3edaf8781af6f18 (patch) | |
tree | 91c28680ab6c0538c9bbb8c0e07df0b3e1e94672 | |
parent | f8e72fcd1cf4c3136a6599d9cfc3d9292c04fb57 (diff) | |
download | pam-11242b809f8084c58e7fc306c3edaf8781af6f18.tar.gz pam-11242b809f8084c58e7fc306c3edaf8781af6f18.tar.bz2 pam-11242b809f8084c58e7fc306c3edaf8781af6f18.zip |
never unlink the .pam-old file - just only create it if --force is set.
-rwxr-xr-x | debian/local/pam-auth-update | 6 |
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 |