[c5c522c] | 1 | BASH PATCH REPORT |
---|
| 2 | ================= |
---|
| 3 | |
---|
| 4 | Bash-Release: 4.3 |
---|
| 5 | Patch-ID: bash43-034 |
---|
| 6 | |
---|
| 7 | Bug-Reported-by: Dreamcat4 <dreamcat4@gmail.com> |
---|
| 8 | Bug-Reference-ID: <CAN39uTpAEs2GFu4ebC_SfSVMRTh-DJ9YanrY4BZZ3OO+CCHjng@mail.gmail.com> |
---|
| 9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html |
---|
| 10 | |
---|
| 11 | Bug-Description: |
---|
| 12 | |
---|
| 13 | If neither the -f nor -v options is supplied to unset, and a name argument is |
---|
| 14 | found to be a function and unset, subsequent name arguments are not treated as |
---|
| 15 | variables before attempting to unset a function by that name. |
---|
| 16 | |
---|
| 17 | Patch (apply with `patch -p0'): |
---|
| 18 | |
---|
| 19 | *** ../bash-4.3-patched/builtins/set.def 2013-04-19 07:20:34.000000000 -0400 |
---|
| 20 | --- builtins/set.def 2015-05-05 13:25:36.000000000 -0400 |
---|
| 21 | *************** |
---|
| 22 | *** 752,758 **** |
---|
| 23 | --- 797,805 ---- |
---|
| 24 | { |
---|
| 25 | int unset_function, unset_variable, unset_array, opt, nameref, any_failed; |
---|
| 26 | + int global_unset_func, global_unset_var; |
---|
| 27 | char *name; |
---|
| 28 | |
---|
| 29 | unset_function = unset_variable = unset_array = nameref = any_failed = 0; |
---|
| 30 | + global_unset_func = global_unset_var = 0; |
---|
| 31 | |
---|
| 32 | reset_internal_getopt (); |
---|
| 33 | *************** |
---|
| 34 | *** 762,769 **** |
---|
| 35 | { |
---|
| 36 | case 'f': |
---|
| 37 | ! unset_function = 1; |
---|
| 38 | break; |
---|
| 39 | case 'v': |
---|
| 40 | ! unset_variable = 1; |
---|
| 41 | break; |
---|
| 42 | case 'n': |
---|
| 43 | --- 809,816 ---- |
---|
| 44 | { |
---|
| 45 | case 'f': |
---|
| 46 | ! global_unset_func = 1; |
---|
| 47 | break; |
---|
| 48 | case 'v': |
---|
| 49 | ! global_unset_var = 1; |
---|
| 50 | break; |
---|
| 51 | case 'n': |
---|
| 52 | *************** |
---|
| 53 | *** 778,782 **** |
---|
| 54 | list = loptend; |
---|
| 55 | |
---|
| 56 | ! if (unset_function && unset_variable) |
---|
| 57 | { |
---|
| 58 | builtin_error (_("cannot simultaneously unset a function and a variable")); |
---|
| 59 | --- 825,829 ---- |
---|
| 60 | list = loptend; |
---|
| 61 | |
---|
| 62 | ! if (global_unset_func && global_unset_var) |
---|
| 63 | { |
---|
| 64 | builtin_error (_("cannot simultaneously unset a function and a variable")); |
---|
| 65 | *************** |
---|
| 66 | *** 796,799 **** |
---|
| 67 | --- 843,849 ---- |
---|
| 68 | name = list->word->word; |
---|
| 69 | |
---|
| 70 | + unset_function = global_unset_func; |
---|
| 71 | + unset_variable = global_unset_var; |
---|
| 72 | + |
---|
| 73 | #if defined (ARRAY_VARS) |
---|
| 74 | unset_array = 0; |
---|
| 75 | |
---|
| 76 | *** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 |
---|
| 77 | --- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 |
---|
| 78 | *************** |
---|
| 79 | *** 26,30 **** |
---|
| 80 | looks for to find the patch level (for the sccs version string). */ |
---|
| 81 | |
---|
| 82 | ! #define PATCHLEVEL 33 |
---|
| 83 | |
---|
| 84 | #endif /* _PATCHLEVEL_H_ */ |
---|
| 85 | --- 26,30 ---- |
---|
| 86 | looks for to find the patch level (for the sccs version string). */ |
---|
| 87 | |
---|
| 88 | ! #define PATCHLEVEL 34 |
---|
| 89 | |
---|
| 90 | #endif /* _PATCHLEVEL_H_ */ |
---|