]> git.saurik.com Git - apt.git/commitdiff
DropPrivs: Hard-fail if the user does not exist
authorJulian Andres Klode <jak@debian.org>
Wed, 24 Sep 2014 20:07:27 +0000 (22:07 +0200)
committerJulian Andres Klode <jak@debian.org>
Wed, 24 Sep 2014 20:07:27 +0000 (22:07 +0200)
Git-Dch: ignore

apt-pkg/contrib/fileutl.cc

index b092a7798763e5fe00a5ae3274e6f33a046f1ef1..9d09dcdd3ce13e0c8f17fc7c39f76b7eebbff351 100644 (file)
@@ -2187,7 +2187,7 @@ bool DropPrivs()
    const std::string nobody = _config->Find("APT::User::Nobody", "_apt");
    struct passwd *pw = getpwnam(nobody.c_str());
    if (pw == NULL)
-      return _error->Warning("No user %s, can not drop rights", nobody.c_str());
+      return _error->Error("No user %s, can not drop rights", nobody.c_str());
 
 #if __gnu_linux__
    // see prctl(2), needs linux3.5