usr/src/cmd/bash/Patches-4.0/bash40-034
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
permissions -rw-r--r--
Bash patch catchup including shellshock
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
254
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     1
			     BASH PATCH REPORT
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     2
			     =================
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     3
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     4
Bash-Release:	4.0
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     5
Patch-ID:	bash40-034
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     6
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     7
Bug-Reported-by:	Anders Kaseorg <[email protected]>
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     8
Bug-Reference-ID:	<[email protected]>
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     9
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-09/msg00043.html
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    10
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    11
Bug-Description:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    12
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    13
When using the globstar option, bash incorrectly interprets wildcarded path
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    14
components between a **/ and the last / as matching any path, even if the
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    15
constructed path does not match any files.
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    16
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    17
Patch:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    18
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    19
*** ../bash-4.0-patched/lib/glob/glob.c	2009-07-22 23:18:50.000000000 -0400
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    20
--- lib/glob/glob.c	2009-09-18 17:53:25.000000000 -0400
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    21
***************
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    22
*** 920,928 ****
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    23
  	  char **temp_results;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    24
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    25
  	  /* Scan directory even on a NULL filename.  That way, `*h/'
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    26
  	     returns only directories ending in `h', instead of all
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    27
  	     files ending in `h' with a `/' appended. */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    28
  	  dname = directories[i];
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    29
! 	  dflags = flags & ~GX_MARKDIRS;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    30
  	  if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    31
  	    dflags |= GX_ALLDIRS|GX_ADDCURDIR;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    32
--- 927,938 ----
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    33
  	  char **temp_results;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    34
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    35
+ 	  /* XXX -- we've recursively scanned any directories resulting from
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    36
+ 	     a `**', so turn off the flag.  We turn it on again below if
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    37
+ 	     filename is `**' */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    38
  	  /* Scan directory even on a NULL filename.  That way, `*h/'
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    39
  	     returns only directories ending in `h', instead of all
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    40
  	     files ending in `h' with a `/' appended. */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    41
  	  dname = directories[i];
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    42
! 	  dflags = flags & ~(GX_MARKDIRS|GX_ALLDIRS|GX_ADDCURDIR);
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    43
  	  if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    44
  	    dflags |= GX_ALLDIRS|GX_ADDCURDIR;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    45
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    46
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    47
***************
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    48
*** 26,30 ****
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    49
     looks for to find the patch level (for the sccs version string). */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    50
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    51
! #define PATCHLEVEL 33
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    52
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    53
  #endif /* _PATCHLEVEL_H_ */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    54
--- 26,30 ----
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    55
     looks for to find the patch level (for the sccs version string). */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    56
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    57
! #define PATCHLEVEL 34
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    58
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    59
  #endif /* _PATCHLEVEL_H_ */