summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-06-06 11:17:30 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-06-06 11:26:52 +0200
commit83b239c7285ac7450e305643b29596396abc0b3f (patch)
treeebf1a886cfade300e4650f9b7a45d4448a77caed /apt-pkg/acquire.cc
parentcb608f5c1e8af4f6fe68bc31cb96013308a4003b (diff)
Do not hardcode (wrong) group and mode in setup warning
Partial directories are created with 0700, but the parent is 0755, while the error message would report 0700 for both… that isn't right and can be pretty confusing. Turns out that the messages aren't marked for translation, so no unfuzzing is required & we just leave it as untranslated for now. Especially as the more detailed error strings derived from errno are translated. Reported-By: Wakko Warner <wakko@animx.eu.org> Closes: #962310
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index e84f4a5b2..1cffc0463 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -105,18 +105,18 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const
{
// chown the partial dir
if(chown(partial.c_str(), pw->pw_uid, gr->gr_gid) != 0)
- _error->WarningE("SetupAPTPartialDirectory", "chown to %s:root of directory %s failed", SandboxUser.c_str(), partial.c_str());
+ _error->WarningE("SetupAPTPartialDirectory", "chown to %s:%s of directory %s failed", SandboxUser.c_str(), ROOT_GROUP, partial.c_str());
}
}
if (chmod(partial.c_str(), mode) != 0)
- _error->WarningE("SetupAPTPartialDirectory", "chmod 0700 of directory %s failed", partial.c_str());
+ _error->WarningE("SetupAPTPartialDirectory", "chmod 0%03o of directory %s failed", mode, partial.c_str());
}
else if (chmod(partial.c_str(), mode) != 0)
{
// if we haven't created the dir and aren't root, it is kinda expected that chmod doesn't work
if (partialExists == false)
- _error->WarningE("SetupAPTPartialDirectory", "chmod 0700 of directory %s failed", partial.c_str());
+ _error->WarningE("SetupAPTPartialDirectory", "chmod 0%03o of directory %s failed", mode, partial.c_str());
}
_error->PushToStack();