OSSP CVS Repository

ossp - Check-in [3417]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3417
Date: 2003-Jun-03 10:28:19 (local)
2003-Jun-03 08:28:19 (UTC)
User:rse
Branch:
Comment: Make sure "shtool install -e ..." does not fail with "permission denied" on the internally created temporary files if the source file is not writeable to the current user. This occurs because cp(1) does not in all cases honor umask(2) (even without option -p) -- mainly if the source file is already owned by the current user (then the permissions are always copied). Hence an explicit "chmod u+w" is required if the "shtool install" substitution feature (option -e) is used.

Discovered by: Thomas Lotterer <thomas@lotterer.net>

Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.187 -> 1.188     11 inserted, 0 deleted
ossp-pkg/shtool/README      1.94 -> 1.95     1 inserted, 1 deleted
ossp-pkg/shtool/VERSION      1.71 -> 1.72     1 inserted, 1 deleted
ossp-pkg/shtool/sh.install      1.27 -> 1.28     1 inserted, 0 deleted

ossp-pkg/shtool/ChangeLog 1.187 -> 1.188

--- ChangeLog    2003/05/16 08:46:26     1.187
+++ ChangeLog    2003/06/03 08:28:19     1.188
@@ -11,6 +11,17 @@
 
  Changes between 1.6.2 and 2.0b0 (02-Nov-2002 to xx-May-2003):
 
+   *) Make sure "shtool install -e ..." does not fail with "permission
+      denied" on the internally created temporary files if the source
+      file is not writeable to the current user. This occurs because
+      cp(1) does not in all cases honor umask(2) (even without option
+      -p) -- mainly if the source file is already owned by the current
+      user (then the permissions are always copied). Hence an explicit
+      "chmod u+w" is required if the "shtool install" substitution
+      feature (option -e) is used.
+      [Thomas Lotterer <thomas@lotterer.net>,
+       Ralf S. Engelschall <rse@engelschall.com>]
+
    *) When patching a file with "shtool subst" try to make it
       writeable first in case it has permissions set differently.
       [Ralf S. Engelschall <rse@engelschall.com>]


ossp-pkg/shtool/README 1.94 -> 1.95

--- README       2003/05/09 09:50:13     1.94
+++ README       2003/06/03 08:28:19     1.95
@@ -10,7 +10,7 @@
   http://www.gnu.org/software/shtool/
   ftp://ftp.gnu.org/gnu/shtool/
 
-  Version 2.0b0 (09-May-2003)
+  Version 2.0b0 (03-Jun-2003)
 
   The GNU shtool program is a compilation of small but very stable and
   portable shell scripts into a single shell tool. All ingredients


ossp-pkg/shtool/VERSION 1.71 -> 1.72

--- VERSION      2003/05/09 09:50:13     1.71
+++ VERSION      2003/06/03 08:28:19     1.72
@@ -2,5 +2,5 @@
   VERSION -- Version Information for GNU shtool (syntax: Text)
   [automatically generated and maintained by GNU shtool]
 
-  This is GNU shtool, Version 2.0b0 (09-May-2003)
+  This is GNU shtool, Version 2.0b0 (03-Jun-2003)
 


ossp-pkg/shtool/sh.install 1.27 -> 1.28

--- sh.install   2003/02/11 13:00:50     1.27
+++ sh.install   2003/06/03 08:28:19     1.28
@@ -137,6 +137,7 @@
             sed="$sed -e '$e'"
         done
         cp $dsttmp $dsttmp.old
+        chmod u+w $dsttmp
         eval "$sed <$dsttmp.old >$dsttmp" || shtool_exit $?
         rm -f $dsttmp.old
     fi

CVSTrac 2.0.1