]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / apt-pkg / acquire.cc
index 34c7f06de5d2fc9c06f8f9a913a6b32cd8ddfe7f..1aa709381b98f8a362ef3eb761024d959b44437b 100644 (file)
@@ -83,10 +83,11 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const
 
    if (getuid() == 0) // if we aren't root, we can't chown, so don't try it
    {
-      struct passwd *pw = getpwnam("_apt");
+      std::string SandboxUser = _config->Find("APT::Sandbox::User");
+      struct passwd *pw = getpwnam(SandboxUser.c_str());
       struct group *gr = getgrnam("root");
       if (pw != NULL && gr != NULL && chown(partial.c_str(), pw->pw_uid, gr->gr_gid) != 0)
-        _error->WarningE("SetupAPTPartialDirectory", "chown to _apt:root of directory %s failed", partial.c_str());
+        _error->WarningE("SetupAPTPartialDirectory", "chown to %s:root of directory %s failed", SandboxUser.c_str(), partial.c_str());
    }
    if (chmod(partial.c_str(), 0700) != 0)
       _error->WarningE("SetupAPTPartialDirectory", "chmod 0700 of directory %s failed", partial.c_str());
@@ -1017,6 +1018,6 @@ void pkgAcquireStatus::Fetched(unsigned long long Size,unsigned long long Resume
 }
                                                                        /*}}}*/
 
-pkgAcquire::UriIterator::~UriIterator() {}
-pkgAcquire::MethodConfig::~MethodConfig() {}
-pkgAcquireStatus::~pkgAcquireStatus() {}
+APT_CONST pkgAcquire::UriIterator::~UriIterator() {}
+APT_CONST pkgAcquire::MethodConfig::~MethodConfig() {}
+APT_CONST pkgAcquireStatus::~pkgAcquireStatus() {}