aboutsummaryrefslogtreecommitdiffstats
path: root/main/bash/CVE-2016-7543.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/bash/CVE-2016-7543.patch')
-rw-r--r--main/bash/CVE-2016-7543.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/bash/CVE-2016-7543.patch b/main/bash/CVE-2016-7543.patch
new file mode 100644
index 0000000000..2ce0f6f363
--- /dev/null
+++ b/main/bash/CVE-2016-7543.patch
@@ -0,0 +1,29 @@
+From f43310742819253bfa6add2dce406701bb8cc2bb Mon Sep 17 00:00:00 2001
+From: Siteshwar Vashisht <svashisht@redhat.com>
+Date: Wed, 28 Sep 2016 18:33:55 +0530
+Subject: [PATCH] CVE-2016-7543: Patch imported from bash-4.4
+
+---
+ variables.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/variables.c b/variables.c
+index ac587f3..ffd39e8 100644
+--- variables.c
++++ variables.c
+@@ -496,7 +496,11 @@ initialize_shell_variables (env, privmode)
+ #endif
+ set_if_not ("PS2", secondary_prompt);
+ }
+- set_if_not ("PS4", "+ ");
++
++ if (current_user.euid == 0)
++ bind_variable ("PS4", "+ ", 0);
++ else
++ set_if_not ("PS4", "+ ");
+
+ /* Don't allow IFS to be imported from the environment. */
+ temp_var = bind_variable ("IFS", " \t\n", 0);
+--
+2.5.5
+