aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pseudo_client.c22
-rw-r--r--pseudo_util.c1
2 files changed, 23 insertions, 0 deletions
diff --git a/pseudo_client.c b/pseudo_client.c
index a03d6b1..c55ab9d 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -1577,6 +1577,28 @@ int pseudo_client_ignore_path_chroot(const char *path, int ignore_chroot) {
if (ignore_chroot && pseudo_chroot && strncmp(path, pseudo_chroot, pseudo_chroot_len) == 0)
return 0;
+ env = pseudo_get_value("PSEUDO_INCLUDE_PATHS");
+ if (env) {
+ char *p = env;
+ if (*path == '\0') {
+ free(env);
+ return 0;
+ }
+ while (p) {
+ char *next = strchr(p, ',');
+ if (next)
+ *next++ = '\0';
+ if (*p && !strncmp(path, p, strlen(p))) {
+ free(env);
+ return 0;
+ }
+ p = next;
+ }
+ pseudo_debug(PDBGF_PATH | PDBGF_VERBOSE, "ignoring path: '%s'\n", path);
+ free(env);
+ return 1;
+ }
+
env = pseudo_get_value("PSEUDO_IGNORE_PATHS");
if (!env)
return 0;
diff --git a/pseudo_util.c b/pseudo_util.c
index b58036f..77edb9d 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -43,6 +43,7 @@ static struct pseudo_variables pseudo_env[] = {
{ "PSEUDO_BINDIR", 13, NULL },
{ "PSEUDO_LIBDIR", 13, NULL },
{ "PSEUDO_LOCALSTATEDIR", 20, NULL },
+ { "PSEUDO_INCLUDE_PATHS", 20, NULL },
{ "PSEUDO_IGNORE_PATHS", 19, NULL },
{ "PSEUDO_PASSWD", 13, NULL },
{ "PSEUDO_CHROOT", 13, NULL },