~ubuntu-branches/debian/jessie/arb/jessie

« back to all changes in this revision

Viewing changes to debian/patches/tmpfile_CVE-2008-5378.patch

  • Committer: Package Import Robot
  • Author(s): Elmar Pruesse, Andreas Tille, Elmar Pruesse
  • Date: 2014-09-02 15:15:06 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140902151506-jihq58b3iz342wif
Tags: 6.0.2-1
[ Andreas Tille ]
* New upstream version
  Closes: #741890
* debian/upstream -> debian/upstream/metadata
* debian/control:
   - Build-Depends: added libglib2.0-dev
   - Depends: added mafft, mrbayes
* debian/rules
   - Add explicite --remove-section=.comment option to manual strip call
* cme fix dpkg-control
* arb-common.dirs: Do not create unneeded lintian dir
* Add turkish debconf translation (thanks for the patch to Mert Dirik
  <mertdirik@gmail.com>)
  Closes: #757497

[ Elmar Pruesse ]
* patches removed:
   - 10_config.makefiles.patch,
     80_no_GL.patch
       removed in favor of creating file from config.makefile.template via 
       sed in debian/control
   - 20_Makefile_main.patch
       merged upstream
   - 21_Makefiles.patch
       no longer needed
   - 30_tmpfile_CVE-2008-5378.patch: 
       merged upstream
   - 50_fix_gcc-4.8.patch:
       merged upstream
   - 40_add_libGLU.patch:
       libGLU not needed for arb_ntree)
   - 60_use_debian_packaged_raxml.patch:
       merged upstream
   - 70_hardening.patch
       merged upstream
   - 72_add_math_lib_to_linker.patch
       does not appear to be needed
* patches added:
   - 10_upstream_r12793__show_db_load_progress:
       backported patch showing progress while ARB is loading a database
       (needed as indicator/splash screen while ARB is launching)
   - 20_upstream_r12794__socket_permissions:
       backported security fix
   - 30_upstream_r12814__desktop_keywords:
       backported add keywords to desktop (fixes lintian warning)
   - 40_upstream_r12815__lintian_spelling:
       backported fix for lintian reported spelling errors
   - 50_private_nameservers
       change configuration to put nameservers into users home dirs
       (avoids need for shared writeable directory)
   - 60_use_debian_phyml
       use phyml from debian package for both interfaces in ARB
* debian/rules:
   - create config.makefile from override_dh_configure target
   - use "make tarfile" in override_dh_install
   - remove extra cleaning not needed for ARB 6
   - use "dh_install --list-missing" to avoid missing files
   - added override_dh_fixperms target
* debian/control:
   - added libarb-dev package
   - Depends: added phyml, xdg-utils
   - Suggests: removed phyml
   - fix lintian duplicate-short-description (new descriptions)
* debian/*.install:
   - "unrolled" confusing globbing to select files
   - pick files from debian/tmp
   - moved all config files to /etc/arb
* debian/arb-common.templates: updated
* scripts:
   - removed arb-add-pt-server
   - launch-wrapper: 
     - only add demo.arb to newly created $ARBUSERDATA
     - pass commandline arguments through bin/arb wrapper
   - preinst: removing old PT server index files on upgrade from 5.5*
   - postinst: set setgid on shared PT dir
* rewrote arb.1 manfile
* added file icon for ARB databases
* using upstream arb_tcp.dat

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
BugClosed: http://bugs.debian.org/508942
2
 
Description: This patch fixes tmpfile issues reported in CVE-2008-5378
3
 
 
4
 
--- a/SH/arb_fastdnaml
5
 
+++ b/SH/arb_fastdnaml
6
 
@@ -1,9 +1,10 @@
7
 
 #!/bin/sh
8
 
 tmp=`mktemp -t arb_fdnaml_XXXXXXXXXX`
9
 
+pidfile=`mktemp -p /tmp foo_${USER}_${PPID}_XXXXXX`
10
 
 mv infile $tmp
11
 
 nice -19 $1 < $tmp &
12
 
 sig=$!
13
 
-/bin/echo "$sig $$ \c" >>/tmp/arb_pids_${USER}_${ARB_PID}
14
 
+/bin/echo "$sig $$ \c" >>"$pidfile"
15
 
 wait
16
 
 # echo $tmp not deleted for debugging purposes
17
 
 rm -f $tmp
18
 
--- a/SH/arb_clean
19
 
+++ b/SH/arb_clean
20
 
@@ -9,9 +9,14 @@ else
21
 
        pidfiles=/tmp/arb_pids_${USER}_${ARB_PID}
22
 
 fi
23
 
 
24
 
-if  [ "\"X$pidfiles\"" != "X" ];  then
25
 
+# Make sure files to remove are no symbolic links
26
 
+if  [ "\"X$pidfiles\"" != "X" -a -f "$pidfiles" ];  then
27
 
        kill -9 `cat $pidfiles` >/dev/null 2>&1
28
 
        rm -f $pidfiles
29
 
 fi
30
 
 
31
 
-rm -f /tmp/arb_*_${USER}_${ARB_PID}*
32
 
+for pidfile in /tmp/arb_*_${USER}_${ARB_PID}* ; do
33
 
+       if [ -f "$pidfile" ] ; then
34
 
+               rm -f "$pidfile"
35
 
+       fi
36
 
+done
37
 
--- a/SH/arb_panic
38
 
+++ b/SH/arb_panic
39
 
@@ -21,7 +21,9 @@ echo "  There may be more than one datab
40
 
 echo "          --------------------------------"
41
 
 
42
 
 for i in $chooser ; do
43
 
-    /bin/echo "             - >" `ls $i` "<";
44
 
+    if [ ! -L "$i" ] ; then
45
 
+        /bin/echo "             - >" `ls $i` "<";
46
 
+    fi
47
 
 done
48
 
 echo "          --------------------------------"
49
 
 
50
 
@@ -29,19 +31,21 @@ seperator
51
 
 echo "Please choose one line and enter the rightmost number"
52
 
 
53
 
 read ARB_PID
54
 
-if [ ! -f /tmp/arb_pids_${USER}_${ARB_PID} ]; then
55
 
-    err "Incorrect Choice"
56
 
-fi
57
 
+for arbpid in /tmp/arb_pids_${USER}_${ARB_PID}* ; do
58
 
+       if [ ! -f "$arbpid" ]; then
59
 
+               err "Incorrect Choice"
60
 
+       fi
61
 
+done
62
 
 
63
 
 seperator
64
 
 echo "Please enter full path (to save DB):"
65
 
 read FILE
66
 
 
67
 
-panicfile="/tmp/arb_panic_${USER}_${ARB_PID}"
68
 
+panicfile=`mktemp -p /tmp arb_panic_${USER}_${ARB_PID}_XXXXXX`
69
 
 rm -f $panicfile
70
 
 echo "$FILE" >$panicfile
71
 
 ok=false
72
 
-for i in `cat /tmp/arb_pids_${USER}_${ARB_PID}`; do
73
 
+for i in `cat /tmp/arb_pids_${USER}_${ARB_PID}*`; do
74
 
     echo "[Sending SIGHUP to pid $i]"
75
 
     if kill -HUP $i 2>/dev/null; then
76
 
         ok=true