Hi Andreas, I'm not quite sure we're on the same page yet, but I'm also not 100% confident that I'm in the right. So here are some additional thoughts:
On 2015-01-29 09:31, Andreas Beckmann wrote: > And while switching sudo->sudo-ldap the following happens: > > sudo gets removed, conffile remains > sudo-ldap.preinst gets called with no previous version, so the conffile > handling is activated - the md5sum matches that one from wheezy and > therefore /etc/sudoers is moved aside It's moved aside if, and only if, /etc/sudoers is the pristine package version. So if it's moved to /etc/sudoers.pre-conffile, we know that 1. The conffile has not been modified by the user 2. The conffile has not been deleted by the user Furthermore, the only reason it is being moved is to avoid a "modified conffile" dialogue when the file was, in fact, not modified. > sudo-ldap replaces sudo and takes over a deleted conffile I don't think so... see above: if it had been deleted (in the sense that the user rm -f'ed it), /etc/sudoers.pre-conffile would not exist (md5sum mismatch of /etc/sudoers). > this is not reinstated - per policy > sudo-ldap.postinst explodes on the deleted conffile. There's two cases here: Case 1: If it had been deleted (by the user), then postinst would indeed fail at the chown. Part A. of my patch addresses this issue. Case 2: if /etc/sudoers but /etc/sudoers.pre-conffile exists, then we know that we have an untouched conffile that was only temporarily moved just to avoid a "modified conffile" dialogue. So it must be moved back. Part B. of my patch does this. > could you try how switching between sudo and sudo-ldap works if the > wheezy md5sum is removed from teh preinst? With my patch applied, I tried various combinations of: 1. not touching /etc/sudoers 2. modifying /etc/sudoers 3. deleting /etc/sudoers whilst switching back-and-forth between sudo and sudo-ldap, and all did the right thing. 1. /etc/sudoers is the package maintainer's version 2. /etc/sudoers is the user-modified version 3. /etc/sudoers does not exist (and a warning is issued) Thoughts? Christian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org