components/automake/automake-1.9.6/patches/00-CVE-2009-4029.patch
changeset 127 3e3c266b3a81
equal deleted inserted replaced
126:1cbfcafbc1e9 127:3e3c266b3a81
       
     1 diff --git a/Makefile.in b/Makefile.in
       
     2 index 68d236d..b7aa318 100644
       
     3 --- a/Makefile.in
       
     4 +++ b/Makefile.in
       
     5 @@ -415,7 +415,8 @@ distdir: $(DISTFILES)
       
     6  	      || exit 1; \
       
     7  	  fi; \
       
     8  	done
       
     9 -	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
       
    10 +	-find "$(distdir)" -type d ! -perm -755 \
       
    11 +		-exec chmod u+rwx,go+rx {} \; -o \
       
    12  	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
       
    13  	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
       
    14  	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
       
    15 diff --git a/lib/am/distdir.am b/lib/am/distdir.am
       
    16 index 151f5f0..b64b2de 100644
       
    17 --- a/lib/am/distdir.am
       
    18 +++ b/lib/am/distdir.am
       
    19 @@ -192,11 +192,7 @@ if %?DIST-TARGETS%
       
    20  endif %?DIST-TARGETS%
       
    21  ##
       
    22  ## This complex find command will try to avoid changing the modes of
       
    23 -## links into the source tree, in case they're hard-linked.  It will
       
    24 -## also make directories writable by everybody, because some
       
    25 -## brain-dead tar implementations change ownership and permissions of
       
    26 -## a directory before extracting the files, thus becoming unable to
       
    27 -## extract them.
       
    28 +## links into the source tree, in case they're hard-linked.
       
    29  ##
       
    30  ## Ignore return result from chmod, because it might give an error
       
    31  ## if we chmod a symlink.
       
    32 @@ -209,7 +205,8 @@ endif %?DIST-TARGETS%
       
    33  ## the file in place in the source tree.
       
    34  ##
       
    35  if %?TOPDIR_P%
       
    36 -	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
       
    37 +	-find "$(distdir)" -type d ! -perm -755 \
       
    38 +		-exec chmod u+rwx,go+rx {} \; -o \
       
    39  	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
       
    40  	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
       
    41  	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \