struct passwd const * const pw = getpwnam(SandboxUser.c_str());
if (pw == NULL)
+ {
+ _error->Warning(_("No sandbox user '%s' on the system, can not drop privileges"), SandboxUser.c_str());
+ _config->Set("APT::Sandbox::User", "");
return;
+ }
gid_t const old_euid = geteuid();
gid_t const old_egid = getegid();
/* This is the total number of bytes needed */
APT_PURE unsigned long long pkgAcquire::TotalNeeded()
{
- return std::accumulate(ItemsBegin(), ItemsEnd(), 0,
+ return std::accumulate(ItemsBegin(), ItemsEnd(), 0llu,
[](unsigned long long const T, Item const * const I) {
return T + I->FileSize;
});
/* This is the number of bytes that is not local */
APT_PURE unsigned long long pkgAcquire::FetchNeeded()
{
- return std::accumulate(ItemsBegin(), ItemsEnd(), 0,
+ return std::accumulate(ItemsBegin(), ItemsEnd(), 0llu,
[](unsigned long long const T, Item const * const I) {
if (I->Local == false)
return T + I->FileSize;
/* This is the number of bytes that is not local */
APT_PURE unsigned long long pkgAcquire::PartialPresent()
{
- return std::accumulate(ItemsBegin(), ItemsEnd(), 0,
+ return std::accumulate(ItemsBegin(), ItemsEnd(), 0llu,
[](unsigned long long const T, Item const * const I) {
if (I->Local == false)
return T + I->PartialSize;