Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 936942 Details for
Bug 1140725
automake: insecure use of /tmp in install-sh
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Firstly create the test directory, then check for mkdir -p
automake-install-sh.patch (text/plain), 2.81 KB, created by
Pavel Raiskup
on 2014-09-12 12:51:12 UTC
(
hide
)
Description:
Firstly create the test directory, then check for mkdir -p
Filename:
MIME Type:
Creator:
Pavel Raiskup
Created:
2014-09-12 12:51:12 UTC
Size:
2.81 KB
patch
obsolete
>diff --git a/lib/install-sh b/lib/install-sh >index 0b0fdcb..59990a1 100755 >--- a/lib/install-sh >+++ b/lib/install-sh >@@ -1,7 +1,7 @@ > #!/bin/sh > # install - install a program, script, or datafile > >-scriptversion=2013-12-25.23; # UTC >+scriptversion=2014-09-12.12; # UTC > > # This originates from X11R5 (mit/util/scripts/install.sh), which was > # later released in X11R6 (xc/config/util/install.sh) with the >@@ -324,34 +324,41 @@ do > # is incompatible with FreeBSD 'install' when (umask & 300) != 0. > ;; > *) >+ # $RANDOM is not portable (e.g. dash); use it when possible to >+ # lower collision chance > tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ >- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 >+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 > >+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so >+ # create the $tmpdir first (and fail if unsuccessful) to make sure >+ # that nobody tries to guess the $tmpdir name. > if (umask $mkdir_umask && >- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 >+ $mkdirprog $mkdir_mode "$tmpdir" && >+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 > then > if test -z "$dir_arg" || { > # Check for POSIX incompatibilities with -m. > # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or > # other-writable bit of parent directory when it shouldn't. > # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. >- ls_ld_tmpdir=`ls -ld "$tmpdir"` >+ test_tmpdir="$tmpdir/a" >+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"` > case $ls_ld_tmpdir in > d????-?r-*) different_mode=700;; > d????-?--*) different_mode=755;; > *) false;; > esac && >- $mkdirprog -m$different_mode -p -- "$tmpdir" && { >- ls_ld_tmpdir_1=`ls -ld "$tmpdir"` >+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { >+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` > test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" > } > } > then posix_mkdir=: > fi >- rmdir "$tmpdir/d" "$tmpdir" >+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" > else > # Remove any dirs left behind by ancient mkdir implementations. >- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null >+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null > fi > trap '' 0;; > esac;;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1140725
: 936942