/[secure-testing]/bin/get-todo-items
ViewVC logotype

Contents of /bin/get-todo-items

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11725 - (show annotations) (download)
Sun Apr 26 22:45:45 2009 UTC (4 years ago) by atomo64-guest
File size: 1432 byte(s)
It uses bashisms, changing shebang to bash
1 #!/bin/bash
2 # Nico Golde <nion@debian.org>
3 # Latest change: Do Sep 20 20:13:19 CEST 2007
4 # extract TODO items for unfixed security issues in unstable/testing
5
6
7 _DIR=`pwd`
8 _NEW_D=(${_DIR//\// })
9 _CNT=`COUNT=0; for i in ${_NEW_D[*]}; do [ ${i} = "secure-testing" ] && echo ${COUNT}; COUNT=$(( COUNT + 1 )); done`
10 _BASE="$( for i in `seq 0 ${_CNT}`; do echo -n "/${_NEW_D[${i}]}"; done; echo )"
11
12 DATA="${_BASE}/data/CVE/list"
13 TMP="list.tmp"
14
15 :> $TMP
16
17 awk "BEGIN { RS = \"CVE-\" } /<unfixed>/" $DATA > $TMP
18
19 while read LINE; do
20
21 case "$LINE" in
22 *\-*\ \(*...\))
23 CVE="CVE-$( echo "$LINE" | cut -d ' ' -f 1 )"
24 ;;
25 *NOTE:*) ;;
26 *\[lenny\]*) ;;
27 *\[etch\]*) ;;
28 *\[sarge\]*) ;;
29 *\<unfixed\>*)
30 # output unimportant issues with -v
31 if [ ! "$1" = "-v" ]; then
32 STATUS="$( echo "$LINE" | grep -e '(*unimportant)*' )"
33 if [ "x$STATUS" = "x$LINE" ]; then
34 continue
35 fi
36 fi
37
38 PKG="$( echo "$LINE" | sed -e 's/.*- \(.\+\)\ <unfixed>.*/\1/' )"
39 BUG="$( echo "$LINE" | sed -e 's/.*bug\ #\([0-9]\+\).*/\1/' )"
40
41 if [ "x$BUG" = "x" -o "x$BUG" = "x$LINE" ]; then
42 TODO="TODO: report bug"
43 echo "$CVE" "$PKG" "$TODO"
44 else
45 TODO="$( ${_BASE}/bin/get-bug-status "$BUG" )"
46 echo "$CVE" "$PKG" "$BUG" "$TODO"
47 fi
48 ;;
49 *) ;;
50 esac
51
52 done < $TMP
53
54 rm -f $TMP

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5