From 83b239c7285ac7450e305643b29596396abc0b3f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 6 Jun 2020 11:17:30 +0200 Subject: Do not hardcode (wrong) group and mode in setup warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Closes: #962310 --- apt-pkg/acquire.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg') 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(); -- cgit v1.2.3