chiark / gitweb /
Disable all exported shell functions
[bash.git] / debian / patches / privmode.diff
1 # DP: XXX missing description
2 # DP: 
3 # DP: Comment from Chet Ramey <chet@nike.ins.cwru.edu>:
4 # DP: 
5 # DP: Nope.  This will allow setuid scripts if not called as `sh' and not 
6 # DP: called with the -p option.  I won't install this. 
7  
8
9 --- a/bash/shell.c
10 +++ b/bash/shell.c
11 @@ -486,7 +486,7 @@
12    if (dump_translatable_strings)
13      read_but_dont_execute = 1;
14  
15 -  if (running_setuid && privileged_mode == 0)
16 +  if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
17      disable_priv_mode ();
18  
19    /* Need to get the argument to a -c option processed in the