From b6152bf17243aac37f3a6118e02102d7f3b8036a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 16 Jun 2008 03:58:21 +0300 Subject: [PATCH] Properly close triggers 'File' file to not leak it to the childs --- ChangeLog | 5 +++++ debian/changelog | 1 + lib/triglib.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4d823db4..a4fb75ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-16 Guillem Jover + + * lib/triglib.c (trig_file_interests_ensure): Pass the proper mask + to push_cleanup to make sure pop_cleanup closes the file. + 2008-05-15 Guillem Jover * scripts/dpkg-divert.pl (checkrename): Do not check the target file diff --git a/debian/changelog b/debian/changelog index 8c54d2f0..ba76d1ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ dpkg (1.14.20) UNRELEASED; urgency=low * When dpkg-divert does renames do no check the target file if the source does not exist and the rename is thus being disabled. This also allows to remove bogus diversions. Closes: #476973, #469033 + * Properly close triggers 'File' file, so it does not get leaked to childs. [ Raphael Hertzog ] * Add missing 'use File::Path' in Dpkg::Source::Package::V3::quilt. diff --git a/lib/triglib.c b/lib/triglib.c index 59b9bc96..f86aaf63 100644 --- a/lib/triglib.c +++ b/lib/triglib.c @@ -480,7 +480,7 @@ trig_file_interests_ensure(void) triggersfilefile); } - push_cleanup(cu_closefile, 0, NULL, 0, 1, f); + push_cleanup(cu_closefile, ~0, NULL, 0, 1, f); while (fgets_checked(linebuf, sizeof(linebuf), f, triggersfilefile) >= 0) { space = strchr(linebuf, ' '); if (!space || linebuf[0] != '/') -- 2.39.5