aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-24 22:15:53 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-24 22:15:53 +0000
commitc3f58c23a88bf9bd9ad3499505a2eb93089ac50b (patch)
treedd1899dff9179d19481473acd0a6908f29db54d8
parent183d862c0ef838cf387dd1e4b75f9f0474da44e7 (diff)
downloadpaludis-c3f58c23a88bf9bd9ad3499505a2eb93089ac50b.tar.gz
paludis-c3f58c23a88bf9bd9ad3499505a2eb93089ac50b.tar.xz
Allow reduced uids for tests
-rw-r--r--paludis/environments/test/test_environment.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 0a7a5aa..e15e537 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -27,6 +27,8 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/tribool.hh>
+#include <paludis/util/destringify.hh>
+#include <paludis/util/system.hh>
#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/hook.hh>
@@ -138,13 +140,13 @@ TestEnvironment::local_set(const SetName & s) const
uid_t
TestEnvironment::reduced_uid() const
{
- return getuid();
+ return destringify<int>(getenv_with_default("PALUDIS_REDUCED_UID", stringify(getuid())));
}
gid_t
TestEnvironment::reduced_gid() const
{
- return getgid();
+ return destringify<int>(getenv_with_default("PALUDIS_REDUCED_GID", stringify(getgid())));
}
const FSEntry