2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

libraries/libapparmor/swig/perl/examples/example.pl: more fixes

This commit is contained in:
Jamie Strandboge
2010-01-12 09:52:00 -06:00
parent e8b3312f2e
commit d4d9dda5cb

View File

@@ -1,10 +1,10 @@
require LibAppArmor;
$msg = "type=APPARMOR msg=audit(1168662182.495:58): PERMITTING r access to /home/matt/projects/change_hat_test/test (test_hat(27871) profile /home/matt/projects/change_hat_test/test_hat active null-complain-profile)";
$msg = 'type=APPARMOR_ALLOWED msg=audit(1257283891.471:2232): operation="file_perm" pid=4064 parent=4002 profile="/usr/bin/gedit" requested_mask="w::" denied_mask="w::" fsuid=1000 ouid=1000 name="/home/jamie/.gnome2/accels/gedit"';
my($test) = LibAppArmorc::parse_record($msg);
if (LibAppArmor::aa_log_record::swig_event_get($test) == $AppArmorLogRecordParser::AA_RECORD_ALLOWED )
if (LibAppArmor::aa_log_record::swig_event_get($test) == $LibAppArmor::AA_RECORD_ALLOWED )
{
print "AA_RECORD_ALLOWED\n";
}