Make the location of logger configurable via /etc/apparmor/logprof.conf

This commit is contained in:
Steve Beattie 2007-08-14 22:07:40 +00:00
parent 50d958b5e8
commit 4c1effc3a2
4 changed files with 9 additions and 1 deletions

View file

@ -51,6 +51,7 @@ our @EXPORT = qw(
$filename
$profiledir
$parser
$logger
$UI_Mode
$running_under_genprof
@ -135,6 +136,7 @@ our $filename;
our $parser;
our $ldd;
our $logger;
our $profiledir;
our $extraprofiledir;
@ -4973,5 +4975,8 @@ unless (-f $filename) { fatal_error "Can't find system log."; }
$ldd = find_first_file($cfg->{settings}{ldd}) || "/usr/bin/ldd";
unless (-x $ldd) { fatal_error "Can't find ldd."; }
$logger = find_first_file($cfg->{settings}{logger}) || "/bin/logger";
unless (-x $logger) { fatal_error "Can't find logger."; }
1;

View file

@ -95,6 +95,8 @@ fi
%changelog
* Tue Aug 14 2007 - sbeattie@suse.de
- Support configurable locations of logger
* Tue Apr 3 2007 - sbeattie@suse.de
- Add manpages to package
* Fri Mar 23 2007 - sbeattie@suse.de

View file

@ -125,7 +125,7 @@ while (not $done_profiling) {
$logmark = `date | md5sum`;
chomp $logmark;
$logmark = $1 if $logmark =~ /^([0-9a-f]+)/;
system("/bin/logger -p kern.warn 'GenProf: $logmark'");
system("$logger -p kern.warn 'GenProf: $logmark'");
} else {
$logmark = last_audit_entry_time();
}

View file

@ -16,6 +16,7 @@
parser = /sbin/apparmor_parser /sbin/subdomain_parser
ldd = /usr/bin/ldd
logger = /bin/logger /usr/bin/logger
# custom directory locations to look for #includes
#