diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-08-23 13:46:35 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-08-27 11:27:45 +0200 |
commit | d12561703c7776f665b68c91bddb28dea0728894 (patch) | |
tree | a6ce47161e8dfa2670fdbda7551e441203b51040 /cmdline | |
parent | 3a8776a37af38127fb04565959e8e0e449eb04a4 (diff) |
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.
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 5 |
1 files changed, 1 insertions, 4 deletions
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) |