bash/bash-4.4-cve-2016-7543.patch

30 lines
787 B
Diff

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
--- a/variables.c
+++ b/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