aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--variables.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/variables.c b/variables.c
index f816ffe..b059b1a 100644
--- a/variables.c
+++ b/variables.c
@@ -1601,6 +1601,13 @@ assign_hashcmd (self, value, ind, key)
arrayind_t ind;
char *key;
{
+#if defined (RESTRICTED_SHELL)
+ if (restricted && strchr (value, '/'))
+ {
+ sh_restricted (value);
+ return (SHELL_VAR *)NULL;
+ }
+#endif
phash_insert (key, value, 0, 0);
return (build_hashcmd (self));
}