summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-07-26 19:09:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-07-26 19:09:59 +0200
commit2920e9428e26004f90a1f1ea86f07850b2204f85 (patch)
tree601b38dc82e987ad0ed141caa31b480e6f6fb4ca /apt-pkg/acquire.cc
parentf2f8e89f08cdf01c83a0b8ab053c65329d85ca90 (diff)
parent8580574ec63fedd39a3ab3b9f0025e08eae5f620 (diff)
Merge branch 'feature/authconf'
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 5e5e146a8..9272c2402 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -74,21 +74,6 @@ void pkgAcquire::Initialize()
QueueMode = QueueHost;
if (strcasecmp(Mode.c_str(),"access") == 0)
QueueMode = QueueAccess;
-
- // chown the auth.conf file as it will be accessed by our methods
- std::string const SandboxUser = _config->Find("APT::Sandbox::User");
- 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_GROUP);
- if (pw != NULL && gr != NULL)
- {
- std::string const AuthConf = _config->FindFile("Dir::Etc::netrc");
- if(AuthConf.empty() == false && RealFileExists(AuthConf) &&
- chown(AuthConf.c_str(), pw->pw_uid, gr->gr_gid) != 0)
- _error->WarningE("SetupAPTPartialDirectory", "chown to %s:root of file %s failed", SandboxUser.c_str(), AuthConf.c_str());
- }
- }
}
/*}}}*/
// Acquire::GetLock - lock directory and prepare for action /*{{{*/