summaryrefslogtreecommitdiff
path: root/common/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/path.c')
-rw-r--r--common/path.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/path.c b/common/path.c
index 0ff1431..d807301 100644
--- a/common/path.c
+++ b/common/path.c
@@ -99,6 +99,11 @@ expand_homedir (const char *remainder)
if (remainder[0] == '\0')
remainder = NULL;
+ if (getauxval (AT_SECURE)) {
+ errno = EPERM;
+ return NULL;
+ }
+
env = getenv ("HOME");
if (env && env[0]) {
return p11_path_build (env, remainder, NULL);