From dd6da7d2392e2ad35c444ebc2d7bc2308380530c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 31 Aug 2015 02:31:10 +0200 Subject: ignore for _apt inaccessible TMPDIR in pkgAcqChangelog Using libpam-tmpdir caused us to create our download tmp directory in root's private tmp before changing to _apt, which wouldn't have access to it. By extending our GetTempDir method with an optional wrapper changing the effective user, we can test if a given user can access the directory and ignore TMPDIR if not instead of ignoring TMPDIR completely. Closes: 797270 --- apt-pkg/contrib/fileutl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/contrib/fileutl.h') diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index acfd560ab..cddfe2b45 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -159,6 +159,7 @@ time_t GetModificationTime(std::string const &Path); bool Rename(std::string From, std::string To); std::string GetTempDir(); +std::string GetTempDir(std::string const &User); FileFd* GetTempFile(std::string const &Prefix = "", bool ImmediateUnlink = true, FileFd * const TmpFd = NULL); -- cgit v1.2.3