Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 7b15af08f50ab3f2d0d0884ec05fd412 > files > 67

bash-4.3-48.4.mga6.src.rpm

diff --git a/variables.c b/variables.c
index a799f50..be2446e 100644
--- a/variables.c
+++ b/variables.c
[...]
@@ -1628,6 +1632,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));
 }