Commit graph

24 commits

Author SHA1 Message Date
John Johansen
e478b9b37d The following patch extends the libraries log parsing to support more date
time formats. As this is causing failures on some systems

currently the only supported format is
  <Month> ## hh:mm:ss

extend this to
  <Month> ## hh:mm:ss(.ms)?((+|-)timezone)?

  yyyy-mm-dd hh:mm:ss(.ms)?((+|-)timezone)?

  yyyy-mm-ddThh:mm:ss(.ms)?((+|-)timezone)?
2013-01-08 12:51:07 -08:00
Kees Cook
33557e22ed The m4 shipped to handle Python was incorrectly clearing
$CPPFLAGS. Additionally, do not repeat compiler flags for automake
targets that already include them, and pass more flags to the Perl build.

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-25 12:15:19 -07:00
Steve Beattie
f7ce93b27c libapparmor: add support for ip addresses and ports
Bugs: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/800826
  https://bugzilla.novell.com/show_bug.cgi?id=755923

This patch modifies the libapparmor log parsing code to add support
for the additional ip address and port keywords that can occur in
network rejection rules. The laddr and faddr keywords stand for local
address and foreign address respectively.

The regex used to match an ip address is not very strict, to hopefully
catch the formats that the kernel emits for ipv6 addresses; however,
because this is in a context triggered by the addr keywords, it should
not over-eagerly consume non-ip addresses. Said addresses are returned
as strings in the struct to be processed by the calling application.

Bug: https://launchpad.net/bugs/800826
2012-04-06 15:59:04 -07:00
Steve Beattie
1e8dc4f375 This fixes the libapparmor log parsing library to properly parse log
entries where the comm entry has been hex-encoded. This occurs when the
binary being confined contains a space or other problematic character in
its filename. A test case is included.
2011-11-30 11:07:48 -08:00
Steve Beattie
7988124de5 Add a testcase for libapparmor for encoded profiles to ensure that
https://bugs.launchpad.net/apparmor/+bug/897957/ is in the utils and not
the parsing library itself.
2011-11-30 09:53:04 -08:00
Steve Beattie
1c2591de1e This patch removes all of the old log parsing code from libapparmor.
The testcases that were in place for the old style log messages have
had their expected output modified such that they are expected to
return invalid results, rather than deleting the testcases outright.
2011-01-21 11:47:54 -08:00
Steve Beattie
cb96345f21 From: Jeff Mahoney <jeffm@suse.com>
dynamically link in libapparmor library in libapparmor's testsuite.
2011-01-05 14:41:11 -08:00
Kees Cook
225c779225 This patch cleans up the testsuite output harder, and removes a bashism in
another clean target.
2010-11-03 17:04:43 -07:00
Steve Beattie
8fd1f15ae7 Add testcases for trunk commits 1486-1490. 2010-09-09 17:14:25 -07:00
Steve Beattie
046e1fb215 This is an incomplete fix for bug
https://bugs.launchpad.net/apparmor/+bug/623467

This patch adds some additional testcases to the log parsing
testsuite, to cover rejections for operations that aren't covered by
other testcase (truncate, rename_src, rename_dest, mkdir) as well
as fixing SubDomain.pm to take those operations into account when
parsing log files.

The operations link, unlink, and possibly setattr still need to be
covered by SubDomain.pm
2010-08-25 09:53:39 -07:00
Steve Beattie
341877416e Creating lame empty error files that dejagnu needs for its tests.
Apologies for not getting an ACK on this commit.
2010-08-23 22:34:51 -07:00
Kees Cook
a92f9e67b3 Add "comm" string to the parser structure and testsuite runner. Update
testsuite output to include "comm" report.
2010-07-26 09:20:02 -07:00
Kees Cook
5649f5237b Add testcases for new LSM-audit log messages.
Update log parser grammar to handle new LSM-audit log messages.
2010-07-26 09:16:23 -07:00
Kees Cook
60fb075419 libraries/libapparmor/src/scanner.l: dynamic string handling to avoid stack overflows on log parsing (LP: #519686)
Bug: https://launchpad.net/bugs/519686
2010-02-10 15:13:55 -08:00
Steve Beattie
4265cecdfa From: Marc Deslauriers <marc.deslauriers@ubuntu.com>
Acked-By: Steve Beattie <steve@ubuntu.com>
Ref: https://bugs.launchpad.net/bugs/431929

Parse log entries containing an ouid.

(I added a testcase to Marc's fix.)
2009-09-18 21:13:04 +00:00
Steve Beattie
19ddb3bfa4 Testcases that are vaguely related to
https://bugs.launchpad.net/bugs/340183
2009-03-13 06:39:05 +00:00
Steve Beattie
a9ff89cd5d Testcase reorg: rename all the ones that pertain to the old logging
style for clarity. Support for these should be dropped in the future,
because it just introduces bugs.
2009-03-13 05:48:06 +00:00
Steve Beattie
e6e3447c19 More testcases around syslog parsing. 2008-11-04 17:42:25 +00:00
Steve Beattie
023fe19c6d Add a testcase for the passthrough of unparsed input to stdout as
reported in https://bugs.launchpad.net/bugs/271252
2008-11-03 19:39:34 +00:00
Steve Beattie
449abea6b5 Add a testcase for the syslog format change documented in LP#271252 2008-11-03 19:34:29 +00:00
Steve Beattie
f1de0575d1 Removing old-style log message testcase; sadly, it's unlikely that will
ever support this message type in the log parsing library, given that
there shouldn't be much out there generating old style audit messages
anymore.
2008-11-03 17:48:43 +00:00
Steve Beattie
5c9177fa81 Fixing missing testcase error file 2008-11-03 17:38:08 +00:00
Steve Beattie
6c526f081f Fix compiler warning in the test_multi test program. 2008-11-03 17:17:48 +00:00
John Johansen
7d30be5087 move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00