summaryrefslogtreecommitdiffstats
path: root/bin/gen-DSA
diff options
context:
space:
mode:
authorRaphael Geissert <geissert@debian.org>2013-03-10 19:48:34 +0000
committerRaphael Geissert <geissert@debian.org>2013-03-10 19:48:34 +0000
commit4de462e1968814e0e955780eb8c6af9062c37a76 (patch)
treed3c7ae4cf041a99f9b39456716eb8fe4955de66c /bin/gen-DSA
parent3ae29456c9a01bfe3ce37fbd44fed454e6c45217 (diff)
Allow CVE ids and bug numbers to be passed in any order
No need of passing them as a list in a single argument. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@21567 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/gen-DSA')
-rwxr-xr-xbin/gen-DSA28
1 files changed, 24 insertions, 4 deletions
diff --git a/bin/gen-DSA b/bin/gen-DSA
index 487b5fd0e7..794e3fdd52 100755
--- a/bin/gen-DSA
+++ b/bin/gen-DSA
@@ -32,9 +32,11 @@ export LANG=C
}
[ $# -ge 2 ] || {
- echo "usage: $0 [--save] [DSA] package 'vulnerability desc' [cve(s) [bugnumber]]"
+ echo "usage: $0 [--save] [DSA] package 'vulnerability desc' [cve(s) [bugnumber(s)]]"
echo " 'DSA' is the DSA number, required when issuing a revision"
- echo " 'cve(s)' must be a space separated list in one arg"
+ echo " 'cve(s)' and 'bugnumber(s)' can be passed in any order but"
+ echo " always AFTER the description"
+ echo " If it doesn't like your bug number, prefix it with # and report"
exit 1
} >&2
@@ -149,11 +151,29 @@ fi
PACKAGE="$(tolower "$1")"
VULNERABILITY="$(cleanup_vulnerability "$2")"
-CVE="$(toupper "$3")"
-BUGNUM="${4#\#}"
+shift 2
+
+CVE=
+BUGNUM=
REFERENCES=0
TEXT=
+while [ $# -gt 0 ]; do
+ case "$1" in
+ [cC][vV][eE]-*)
+ CVE="$CVE $(toupper "$1")"
+ ;;
+ [0-9][0-9][0-9][0-9][0-9][0-9]|[#][0-9]*)
+ BUGNUM="$BUGNUM ${1#\#}"
+ ;;
+ *)
+ error "Don't know what to do with '$1' argument" >&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+
CVE="$(split_n_sort "$CVE")"
cve_spacing=

© 2014-2024 Faster IT GmbH | imprint | privacy policy