diff options
author | Julian Andres Klode <jak@debian.org> | 2016-08-27 00:31:03 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-08-27 00:31:03 +0200 |
commit | 6a68315e938eb2611806658828ecea86805822e7 (patch) | |
tree | 5ff552cf0e6bac9a35bedaf544cb19332663fa70 /apt-pkg/acquire.cc | |
parent | 75d238ba66576c04f257e9d7c0a6995721f1441d (diff) | |
parent | 01d207a5076b6fc37a064645b13f2c6550f58b94 (diff) |
Merge branch 'portability/freebsd'
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r-- | apt-pkg/acquire.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index e588b0306..b4d1b5959 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -80,7 +80,7 @@ void pkgAcquire::Initialize() if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it { struct passwd const * const pw = getpwnam(SandboxUser.c_str()); - struct group const * const gr = getgrnam("root"); + struct group const * const gr = getgrnam(ROOT_GROUP); if (pw != NULL && gr != NULL) { std::string const AuthConf = _config->FindFile("Dir::Etc::netrc"); @@ -106,7 +106,7 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it { struct passwd const * const pw = getpwnam(SandboxUser.c_str()); - struct group const * const gr = getgrnam("root"); + struct group const * const gr = getgrnam(ROOT_GROUP); if (pw != NULL && gr != NULL) { // chown the partial dir @@ -1312,7 +1312,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // build the status str std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n'; auto const dlstatus = str.str(); |