always check if _apt user can access /var/lib/apt/lists/partial

This commit is contained in:
Johannes 'josch' Schauer 2020-05-02 23:51:33 +02:00
parent c462a080c3
commit af5841269c
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1610,7 +1610,7 @@ sub run_setup() {
# drop privileges to the _apt user. This will fail if the _apt user does # drop privileges to the _apt user. This will fail if the _apt user does
# not have permissions to read the root directory. In that case, we have # not have permissions to read the root directory. In that case, we have
# to disable apt sandboxing. # to disable apt sandboxing.
if ($options->{mode} eq 'root') { {
my $partial = '/var/lib/apt/lists/partial'; my $partial = '/var/lib/apt/lists/partial';
if ( if (
system('/usr/lib/apt/apt-helper', 'drop-privs', '--', 'test', system('/usr/lib/apt/apt-helper', 'drop-privs', '--', 'test',