Bug 58775 - Missing quotes in grub-0.90-installmktemp.patch
Missing quotes in grub-0.90-installmktemp.patch
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: grub (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-24 07:50 EST by han.holl
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-24 07:50:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description han.holl 2002-01-24 07:50:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020118

Description of problem:
The variable mkstemp can consist of more than one word.
Therefore
test -n $mkstemp
should be:
test -n "$mkstemp"

Version-Release number of selected component (if applicable):0.91


How reproducible:
Always

Steps to Reproduce:
1.Run grub-install
2.
3.
	

Actual Results:  Error message

Expected Results:  No error message

Additional info:

diff -ur grub-0.90/ChangeLog grub/ChangeLog
--- grub-0.90/ChangeLog Fri Aug 24 00:44:46 2001
+++ grub/ChangeLog      Fri Aug 24 00:34:59 2001
@@ -1,3 +1,7 @@
+2001-08-24  Jeremy Katz  <katzj@redhat.com>
+
+       * util/grub-install.in: use mktemp to generate log filename
+
 2001-08-02  Jeremy Katz  <katzj@redhat.com>
        * configure.in:
        link ncurses statically
diff -ur grub-0.90/util/grub-install.in grub/util/grub-install.in
--- grub-0.90/util/grub-install.in      Fri Aug 24 00:44:45 2001
+++ grub/util/grub-install.in   Fri Aug 24 00:46:00 2001
@@ -39,6 +39,16 @@
 recheck=no
 debug=no

+# look for secure tempfile creation wrappers on this platform
+if test -x /bin/tempfile
+    mkstemp="/bin/tempfile --prefix=grub"
+elif test -x /bin/mktemp; then
+    mkstemp="/bin/mktemp /tmp/grub-install.log.XXXXXX"
+else
+    mkstemp=""
+fi
+
+
 # Usage: usage
 # Print the usage.
 usage () {
@@ -268,7 +278,7 @@
     :
 else
     # Create a safe temporary file.
-    test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
+    test -n "$mkstemp" && log_file=`$mkstemp`

     $grub_shell --batch --device-map=$device_map <<EOF >$log_file
 quit
@@ -342,7 +352,7 @@
 done

 # Create a safe temporary file.
-test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
+test -n "$mkstemp" && log_file=`$mkstemp`

 # Now perform the installation.
 $grub_shell --batch --device-map=$device_map <<EOF >$log_file
Comment 1 Jeremy Katz 2002-01-27 20:50:42 EST
Already fixed prior to upstreaming for inclusion in grub 0.91 and thus as of
grub-0.91-1 and later.

Note You need to log in before you can comment on or make changes to this bug.