Commit graph

5 commits

Author SHA1 Message Date
John Johansen
00d9997cdd aa-decode: add the ability to support PROCTITLE string
buglink: https://bugs.launchpad.net/apparmor/+bug/1736841

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 3afbfed9ee)
2017-12-24 00:27:39 -08:00
Christian Boltz
5a053dc580 speed up aa-decode by using a bash regex matching instead of calling egrep for each line.
Acked-by: Steve Beattie <sbeattie@ubuntu.com>

(Patch sent 2012-11-01, Acked-by from 2013-01-01)
2013-01-01 20:15:04 +01:00
Christian Boltz
50d89bc579 Fix aa-decode handling of stdin
Handling stdin was totally broken (= no output) with the current log 
format because aa-decode expected name= to be the last entry in the 
log line.

This patch for stdin handling
- fixes the pattern to match the current log format (name= is NOT the
  last part in the log entry)
- uses bash replacement to avoid some sed calls (which also means the 
  script now needs an explicit "#!/bin/bash")
- prints decoded filenames in double instead of single quotes to be
  consistent with filenames that were not encoded
- also prints lines that do not contain an encoded filename (instead of 
  grepping them away)
- replace tr calls by perl's uc() (also for non-stdin mode)
- also handle encoded profile names (introduced by Steve)
- don't fail if a file or profile name contains a '

In other words: you can pipe your audit.log through aa-decode, and the 
only difference to the raw audit.log is that filenames are decoded.


Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-10-16 00:19:49 +02:00
Christian Boltz
0742f72f4f fix error handling in aa-decode
Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Looks-Good-By: ;-)  Seth Arnold <seth.arnold@gmail.com>
2012-09-17 23:55:28 +02:00
Jamie Strandboge
e8b3312f2e add aa-decode and manpage
For now just look at 'name=...' which is usually the last in the log entry,
so validate input against this and output based on it.
TODO: better handle other cases too
2010-01-12 07:19:20 -06:00