|
Roman Rakus |
b34845 |
BASH PATCH REPORT
|
|
Roman Rakus |
b34845 |
=================
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
Bash-Release: 4.0
|
|
Roman Rakus |
b34845 |
Patch-ID: bash40-034
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
Bug-Reported-by: Anders Kaseorg <andersk@mit.edu>
|
|
Roman Rakus |
b34845 |
Bug-Reference-ID: <1252856832.991059.8162.nullmailer@balanced-tree.mit.edu>
|
|
Roman Rakus |
b34845 |
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-09/msg00043.html
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
Bug-Description:
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
When using the globstar option, bash incorrectly interprets wildcarded path
|
|
Roman Rakus |
b34845 |
components between a **/ and the last / as matching any path, even if the
|
|
Roman Rakus |
b34845 |
constructed path does not match any files.
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
Patch:
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
*** ../bash-4.0-patched/lib/glob/glob.c 2009-07-22 23:18:50.000000000 -0400
|
|
Roman Rakus |
b34845 |
--- lib/glob/glob.c 2009-09-18 17:53:25.000000000 -0400
|
|
Roman Rakus |
b34845 |
***************
|
|
Roman Rakus |
b34845 |
*** 920,928 ****
|
|
Roman Rakus |
b34845 |
char **temp_results;
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
/* Scan directory even on a NULL filename. That way, `*h/'
|
|
Roman Rakus |
b34845 |
returns only directories ending in `h', instead of all
|
|
Roman Rakus |
b34845 |
files ending in `h' with a `/' appended. */
|
|
Roman Rakus |
b34845 |
dname = directories[i];
|
|
Roman Rakus |
b34845 |
! dflags = flags & ~GX_MARKDIRS;
|
|
Roman Rakus |
b34845 |
if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
|
|
Roman Rakus |
b34845 |
dflags |= GX_ALLDIRS|GX_ADDCURDIR;
|
|
Roman Rakus |
b34845 |
--- 927,938 ----
|
|
Roman Rakus |
b34845 |
char **temp_results;
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
+ /* XXX -- we've recursively scanned any directories resulting from
|
|
Roman Rakus |
b34845 |
+ a `**', so turn off the flag. We turn it on again below if
|
|
Roman Rakus |
b34845 |
+ filename is `**' */
|
|
Roman Rakus |
b34845 |
/* Scan directory even on a NULL filename. That way, `*h/'
|
|
Roman Rakus |
b34845 |
returns only directories ending in `h', instead of all
|
|
Roman Rakus |
b34845 |
files ending in `h' with a `/' appended. */
|
|
Roman Rakus |
b34845 |
dname = directories[i];
|
|
Roman Rakus |
b34845 |
! dflags = flags & ~(GX_MARKDIRS|GX_ALLDIRS|GX_ADDCURDIR);
|
|
Roman Rakus |
b34845 |
if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
|
|
Roman Rakus |
b34845 |
dflags |= GX_ALLDIRS|GX_ADDCURDIR;
|
|
Roman Rakus |
b34845 |
*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
|
|
Roman Rakus |
b34845 |
--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
|
|
Roman Rakus |
b34845 |
***************
|
|
Roman Rakus |
b34845 |
*** 26,30 ****
|
|
Roman Rakus |
b34845 |
looks for to find the patch level (for the sccs version string). */
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
! #define PATCHLEVEL 33
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
#endif /* _PATCHLEVEL_H_ */
|
|
Roman Rakus |
b34845 |
--- 26,30 ----
|
|
Roman Rakus |
b34845 |
looks for to find the patch level (for the sccs version string). */
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
! #define PATCHLEVEL 34
|
|
Roman Rakus |
b34845 |
|
|
Roman Rakus |
b34845 |
#endif /* _PATCHLEVEL_H_ */
|