rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone

Blame SOURCES/bash-4.3-cve-2016-7543.patch

a01f16
diff --git a/variables.c b/variables.c
a01f16
index b7ebaea..5e2986f 100644
a01f16
--- a/variables.c
a01f16
+++ b/variables.c
a01f16
@@ -467,7 +467,11 @@ initialize_shell_variables (env, privmode)
a01f16
 #endif
a01f16
       set_if_not ("PS2", secondary_prompt);
a01f16
     }
a01f16
-  set_if_not ("PS4", "+ ");
a01f16
+
a01f16
+  if (current_user.euid == 0)
a01f16
+    bind_variable ("PS4", "+ ", 0);
a01f16
+  else
a01f16
+    set_if_not ("PS4", "+ ");
a01f16
 
a01f16
   /* Don't allow IFS to be imported from the environment. */
a01f16
   temp_var = bind_variable ("IFS", " \t\n", 0);
a01f16
-- 
a01f16
2.9.3
a01f16