mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 13:58:22 +00:00
libraries/libapparmor/swig/perl/examples/example.pl: fix so it works again
This commit is contained in:
parent
d98c8ae8b5
commit
3fd950e823
@ -2,14 +2,14 @@ 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 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)";
|
||||||
|
|
||||||
my($test) = AppArmorLogRecordParser::parse_record($msg);
|
my($test) = LibAppArmorc::parse_record($msg);
|
||||||
|
|
||||||
if (AppArmorLogRecordParser::aa_log_record::swig_event_get($test) == $AppArmorLogRecordParser::AA_RECORD_ALLOWED )
|
if (LibAppArmor::aa_log_record::swig_event_get($test) == $AppArmorLogRecordParser::AA_RECORD_ALLOWED )
|
||||||
{
|
{
|
||||||
print "AA_RECORD_ALLOWED\n";
|
print "AA_RECORD_ALLOWED\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "Audit ID: " . AppArmorLogRecordParser::aa_log_record::swig_audit_id_get($test) . "\n";
|
print "Audit ID: " . LibAppArmor::aa_log_record::swig_audit_id_get($test) . "\n";
|
||||||
print "PID: " . AppArmorLogRecordParser::aa_log_record::swig_pid_get($test) . "\n";
|
print "PID: " . LibAppArmor::aa_log_record::swig_pid_get($test) . "\n";
|
||||||
|
|
||||||
AppArmorLogRecordParser::free_record($test);
|
LibAppArmorc::free_record($test);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user