move temp file removal before possible exit point
[debian/sudo] / debian / sudo-ldap.postinst
index 88e8c2c0184b5177b610261e1fa5644aec74f9a3..0a9a5a425291902bb3326c17b83494c45a4ccd89 100644 (file)
@@ -32,6 +32,9 @@ if (-e "/etc/ldap/ldap.conf" && ! -e "/etc/sudo-ldap.conf") {
   system("ln -s ldap/ldap.conf /etc/sudo-ldap.conf");
 }
 
+# if we've gotten this far .. remove the saved, unchanged old sudoers file
+system ('rm -f /etc/sudoers.pre-conffile');
+
 # make sure we have a sudo group
 
 exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo