1 diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
2 --- ../apt-1.4.7/apt-pkg/contrib/fileutl.cc 2017-07-13 23:45:39.000000000 +0200
3 +++ ./apt-pkg/contrib/fileutl.cc 2017-09-17 20:46:39.567888481 +0200
19 // Glob - wrapper around "glob()" /*{{{*/
20 std::vector<std::string> Glob(std::string const &pattern, int flags)
28 static std::string APT_NONNULL(1) GetTempDirEnv(char const * const env) /*{{{*/
30 @@ -2794,10 +2794,10 @@
32 if (!tmpdir || strlen(tmpdir) == 0 || // tmpdir is set
33 stat(tmpdir, &st) != 0 || (st.st_mode & S_IFDIR) == 0) // exists and is directory
35 + tmpdir = "@TERMUX_PREFIX@/tmp";
36 else if (geteuid() != 0 && // root can do everything anyway
37 faccessat(AT_FDCWD, tmpdir, R_OK | W_OK | X_OK, AT_EACCESS) != 0) // current user has rwx access to directory
39 + tmpdir = "@TERMUX_PREFIX@/tmp";
41 return string(tmpdir);
43 diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.h ./apt-pkg/contrib/fileutl.h
44 --- ../apt-1.4.7/apt-pkg/contrib/fileutl.h 2017-07-13 23:45:39.000000000 +0200
45 +++ ./apt-pkg/contrib/fileutl.h 2017-08-26 22:05:52.875932441 +0200
47 APT_HIDDEN std::string flNormalize(std::string file);
51 std::vector<std::string> Glob(std::string const &pattern, int flags=0);
54 /** \brief Popen() implementation that execv() instead of using a shell