[Fedora-security-commits] fedora-security/tools/Libexig Bodhi.pm, NONE, 1.1.2.1 Audit.pm, 1.1.2.1, 1.1.2.2
fedora-security-commits at redhat.com
fedora-security-commits at redhat.com
Thu Dec 20 23:15:17 UTC 2007
- Previous message (by thread): [Fedora-security-commits] fedora-security/tools check-updates, NONE, 1.1.2.1 get-bodhi-update, 1.1.2.1, NONE parse-audit, 1.1.2.1, NONE
- Next message (by thread): [Fedora-security-commits] fedora-security/tools parse-announce, 1.1, 1.1.2.1 suidaudit, 1.1, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lkundrak
Update of /cvs/fedora/fedora-security/tools/Libexig
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14151/Libexig
Modified Files:
Tag: lkundrak-tools-ng
Audit.pm
Added Files:
Tag: lkundrak-tools-ng
Bodhi.pm
Log Message:
Merge audit parser and bodhi update checker
Move the logic parts into library
***** Error reading new file: [Errno 2] No such file or directory: 'Bodhi.pm'
Index: Audit.pm
===================================================================
RCS file: /cvs/fedora/fedora-security/tools/Libexig/Attic/Audit.pm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- Audit.pm 9 Nov 2007 06:42:18 -0000 1.1.2.1
+++ Audit.pm 20 Dec 2007 23:15:14 -0000 1.1.2.2
@@ -6,6 +6,32 @@
package Libexig::Audit;
+# Get an entry hash and reconstruct its 'line' field
+# (useful if something got changed)
+sub update_entry
+{
+ my $entry = shift;
+
+ $entry->{'line'} = join " ", (
+ $entry->{'need_verif'}.$entry->{'cve'},
+ $entry->{'status'},
+ ($entry->{'version'}
+ ? "($entry->{'package'}, $entry->{'version'})"
+ : "($entry->{'package'})"),
+ ($entry->{'bug'}
+ ? "#$entry->{'bug'}"
+ : ()),
+ ($entry->{'since'}
+ ? "[since $entry->{'since'}]"
+ : ()),
+ $entry->{'comment'}
+ );
+
+ chomp $entry->{'line'};
+ $entry->{'line'} .= "\n";
+}
+
+# Get line and return a hash
sub parse_line
{
shift;
@@ -15,16 +41,16 @@
'line' => $_,
};
} elsif (/^
- (\*?)* # Needs verification
- (\S+-\S+-\S+)\s* # CVE
- (\*\*|version|VULNERABLE|ignore|backport)\s* # Status
+ (\*?)* # Needs verification
+ (\S+-\S+-\S+)\s* # CVE
+ (\*\*|version|VULNERABLE|ignore|backport|fixed)\s* # Status
\(
- ([^\s,]+)\s* # Component
- (,\s*(.*))?\s* # When fixed upstream
+ ([^\s,]+)\s* # Component
+ (,\s*(.*))?\s* # When fixed upstream
\)\s*
- (\#(\d+))?\s* # Bugzilla IS
- (\[since\s+(\S+)\])?\s* # When fixed in Fedora
- (.*) # Comment
+ (\#(\d+))?\s* # Bugzilla IS
+ (\[since\s+(\S+)\])?\s* # When fixed in Fedora
+ (.*) # Comment
/x) {
return {
'need_verif' => $1,
- Previous message (by thread): [Fedora-security-commits] fedora-security/tools check-updates, NONE, 1.1.2.1 get-bodhi-update, 1.1.2.1, NONE parse-audit, 1.1.2.1, NONE
- Next message (by thread): [Fedora-security-commits] fedora-security/tools parse-announce, 1.1, 1.1.2.1 suidaudit, 1.1, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-security-commits
mailing list