Bug#358575: [Pkg-mailman-hackers] Bug#358575: purge mailman deletes
all ucf-managed conffiles
Lionel Elie Mamane
lionel at mamane.lu
Tue Mar 28 07:03:49 UTC 2006
On Thu, Mar 23, 2006 at 11:59:18AM +0100, Marc Haber wrote:
> On Thu, Mar 23, 2006 at 11:23:44AM +0100, Marc Haber wrote:
>> This is most probably a bug in the postrm, since
>> sed -e ':/etc/mailman:!d' -e 's:^[0-9a-f]* *::' /var/lib/ucf/hashfile
>> lists all ucf-managed conffiles, not only the ones belonging to mailman.
> I can NMU if you wish.
Yes, please do so once we have a patch we both agree on and if you
have a test platform where you can test the package before upload.
> --- debian/postrm.orig 2006-03-23 11:58:34.000000000 +0100
> +++ debian/postrm 2006-03-23 11:58:39.000000000 +0100
> @@ -8,7 +8,7 @@
> # HACK: At present there is no way to ask ucf for registered files
> # except for directly querying its database.
> echo -n "Purging files from ucf database " >&2
> - for file in $(sed -e ':/etc/mailman:!d' -e 's:^[0-9a-f]* *::' /var/lib/ucf/hashfile); do
> + for file in $(sed -e '\:/etc/mailman:!d' -e 's:^[0-9a-f]* *::' /var/lib/ucf/hashfile); do
> ucf --purge ${file} 2>/dev/null
> echo -n . >&2
> done
This still looks insecure to me, because it will match a ucf-managed
file named /etc/other-package/etc/mailman/foo/bar, or, perhaps more
probable /etc/mailman-extension/foo/bar . What about (untested)
for file in $(sed -e '\|^[0-9a-fA-F]\+[[:space:]]\+/etc/mailman/|!d' -e 's|^[0-9a-fA-F]\+[[:space:]]\+||' /var/lib/ucf/hashfile); do
?
--
Lionel
More information about the Pkg-mailman-hackers
mailing list