diff options
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/proxy.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/contrib/proxy.cc b/apt-pkg/contrib/proxy.cc index 1b7a92c68..a26ab4fbc 100644 --- a/apt-pkg/contrib/proxy.cc +++ b/apt-pkg/contrib/proxy.cc @@ -13,7 +13,8 @@ #include<apt-pkg/strutl.h> #include<iostream> -#include <unistd.h> +#include<fcntl.h> +#include<unistd.h> #include "proxy.h" /*}}}*/ @@ -41,6 +42,9 @@ bool AutoDetectProxy(URI &URL) if (Debug) std::clog << "Using auto proxy detect command: " << AutoDetectProxyCmd << std::endl; + if (faccessat(AT_FDCWD, AutoDetectProxyCmd.c_str(), R_OK | X_OK, AT_EACCESS) != 0) + return _error->Errno("access", "ProxyAutoDetect command '%s' can not be executed!", AutoDetectProxyCmd.c_str()); + std::string const urlstring = URL; std::vector<const char *> Args; Args.push_back(AutoDetectProxyCmd.c_str()); |