summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2021-01-11 11:39:38 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2021-01-11 11:39:38 +0100
commit229e73afa4d6e862262f898a7e58942c90939306 (patch)
tree2396781be02376963df042a06f07ae46f6652d0c /apt-pkg
parentedb63b14225c783c673dcac0cc3c60aae076e45c (diff)
Call ischroot with -t
We interpreted "cannot detect chroot" as "not a chroot", but it's arguably the better idea to detect it as a chroot, to avoid new behavior from phased updations in situations where it's unclear (no /proc mounted or stuff).
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/aptconfiguration.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index e88029f58..671c3d553 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -529,6 +529,7 @@ bool Configuration::isChroot()
auto binary = _config->FindFile("Dir::Bin::ischroot", "/usr/bin/ischroot");
const char *const Args[] = {
binary.c_str(),
+ "-t",
nullptr};
execvp(Args[0], const_cast<char **>(Args));
_exit(127);