python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / bash / bash44-007.patch
blob71e771d6cf06a786ad7bf31a1ac962337a509ee2
1 From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-007
3 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
5 BASH PATCH REPORT
6 =================
8 Bash-Release: 4.4
9 Patch-ID: bash44-007
11 Bug-Reported-by: Jens Heyens <jens.heyens@cispa.saarland>
12 Bug-Reference-ID:
13 Bug-Reference-URL: https://savannah.gnu.org/support/?109224
15 Bug-Description:
17 When performing filename completion, bash dequotes the directory name being
18 completed, which can result in match failures and potential unwanted
19 expansion.
21 Patch (apply with `patch -p0'):
23 *** bash-4.4-patched/bashline.c 2016-08-05 21:44:05.000000000 -0400
24 --- b/bashline.c 2017-01-19 13:15:51.000000000 -0500
25 ***************
26 *** 143,147 ****
27 static void restore_directory_hook __P((rl_icppfunc_t));
29 ! static int directory_exists __P((const char *));
31 static void cleanup_expansion_error __P((void));
32 --- b/144,148 ----
33 static void restore_directory_hook __P((rl_icppfunc_t));
35 ! static int directory_exists __P((const char *, int));
37 static void cleanup_expansion_error __P((void));
38 ***************
39 *** 3103,3111 ****
42 ! /* Check whether not the (dequoted) version of DIRNAME, with any trailing slash
43 ! removed, exists. */
44 static int
45 ! directory_exists (dirname)
46 const char *dirname;
48 char *new_dirname;
49 --- b/3107,3116 ----
52 ! /* Check whether not DIRNAME, with any trailing slash removed, exists. If
53 ! SHOULD_DEQUOTE is non-zero, we dequote the directory name first. */
54 static int
55 ! directory_exists (dirname, should_dequote)
56 const char *dirname;
57 + int should_dequote;
59 char *new_dirname;
60 ***************
61 *** 3113,3118 ****
62 struct stat sb;
64 ! /* First, dequote the directory name */
65 ! new_dirname = bash_dequote_filename ((char *)dirname, rl_completion_quote_character);
66 dirlen = STRLEN (new_dirname);
67 if (new_dirname[dirlen - 1] == '/')
68 --- b/3118,3124 ----
69 struct stat sb;
71 ! /* We save the string and chop the trailing slash because stat/lstat behave
72 ! inconsistently if one is present. */
73 ! new_dirname = should_dequote ? bash_dequote_filename ((char *)dirname, rl_completion_quote_character) : savestring (dirname);
74 dirlen = STRLEN (new_dirname);
75 if (new_dirname[dirlen - 1] == '/')
76 ***************
77 *** 3146,3150 ****
78 should_expand_dirname = '`';
80 ! if (should_expand_dirname && directory_exists (local_dirname))
81 should_expand_dirname = 0;
83 --- b/3152,3156 ----
84 should_expand_dirname = '`';
86 ! if (should_expand_dirname && directory_exists (local_dirname, 0))
87 should_expand_dirname = 0;
89 ***************
90 *** 3156,3160 ****
91 global_nounset = unbound_vars_is_error;
92 unbound_vars_is_error = 0;
93 ! wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_COMPLETE); /* does the right thing */
94 unbound_vars_is_error = global_nounset;
95 if (wl)
96 --- b/3162,3166 ----
97 global_nounset = unbound_vars_is_error;
98 unbound_vars_is_error = 0;
99 ! wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */
100 unbound_vars_is_error = global_nounset;
101 if (wl)
102 ***************
103 *** 3245,3249 ****
106 ! if (should_expand_dirname && directory_exists (local_dirname))
107 should_expand_dirname = 0;
109 --- b/3262,3266 ----
112 ! if (should_expand_dirname && directory_exists (local_dirname, 1))
113 should_expand_dirname = 0;
115 ***************
116 *** 3251,3255 ****
118 new_dirname = savestring (local_dirname);
119 ! wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_COMPLETE); /* does the right thing */
120 if (wl)
122 --- b/3268,3272 ----
124 new_dirname = savestring (local_dirname);
125 ! wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */
126 if (wl)
128 *** bash-4.4/subst.c 2016-08-30 16:46:38.000000000 -0400
129 --- b/subst.c 2017-01-19 07:09:57.000000000 -0500
130 ***************
131 *** 9459,9462 ****
132 --- b/9459,9466 ----
133 if (word->flags & W_COMPLETE)
134 tword->flags |= W_COMPLETE; /* for command substitutions */
135 + if (word->flags & W_NOCOMSUB)
136 + tword->flags |= W_NOCOMSUB;
137 + if (word->flags & W_NOPROCSUB)
138 + tword->flags |= W_NOPROCSUB;
140 temp = (char *)NULL;
141 *** bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
142 --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
143 ***************
144 *** 26,30 ****
145 looks for to find the patch level (for the sccs version string). */
147 ! #define PATCHLEVEL 6
149 #endif /* _PATCHLEVEL_H_ */
150 --- b/26,30 ----
151 looks for to find the patch level (for the sccs version string). */
153 ! #define PATCHLEVEL 7
155 #endif /* _PATCHLEVEL_H_ */