From d12561703c7776f665b68c91bddb28dea0728894 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 23 Aug 2015 13:46:35 +0200 Subject: use always priv-dropping for changelog download as root First of, the temporary directory we download the changelog to needs to be owned by _apt, but that also means that we don't need to check if we could/should drop privs as the download happens to a dedicated tempdir and only after that it is moved to its final location by a privileged user. --- cmdline/apt-get.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b1260f06a..b6150a423 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1403,10 +1403,7 @@ static bool DoChangelog(CommandLine &CmdL) if (printOnly == false) { - // Disable drop-privs if "_apt" can not write to the target dir - CheckDropPrivsMustBeDisabled(Fetcher); - if (_error->PendingError() == true) - return false; + // Note: CheckDropPrivsMustBeDisabled isn't needed here as the download happens in a dedicated tempdir bool Failed = false; if (AcquireRun(Fetcher, 0, &Failed, NULL) == false || Failed == true) -- cgit v1.2.3