Commit graph

32 commits

Author SHA1 Message Date
Christian Boltz
e99dda15f4
Stop calling ldd in aa-genprof and aa-autodep
In some cases, ldd might obtain information by executing the given
binary (see ldd(1)) - which is not something we should do on potentially
unknown binaries, especially because aa-genprof and aa-autodep (and
therefore also ldd) are often started as root.

Additionally, the ldd result typically listed libraries already covered
by abstractions/base, which makes the ldd call superfluous.

While on it,
- remove all references to ldd
- remove code only used for calling ldd and handling its results
- remove tests checking ldd results, and the fake_ldd script
- adjust a test where fake_ldd had added some libraries
- remove ldd path from logprof.conf [settings]
2024-03-31 18:53:12 +02:00
Christian Boltz
7dc0254b90
Add option to log aa-logprof json input and output
Add a json_log option (default: disabled) to logprof.conf that enables
logging of all aa-logprof and aa-genprof input and output to a
/tmp/aa-jsonlog-* file.

This can be useful for debugging, and maybe also to create tests that do
a full aa-logprof run.

This patch introduces a minor behaviour change if aa-logprof errors out
on startup (for example if the config file is broken or the parser can't
be found):

Before:

```
$ aa-logprof --json
{"dialog": "apparmor-json-version","data": "2.12"}

ERROR: Can't find apparmor_parser at /sbin/apparmor_parser
```

After:

```
$ aa-logprof --json

ERROR: Can't find apparmor_parser at /sbin/apparmor_parser
```

Note that the json version line will not be printed if aa-logprof or
aa-genprof error out that early.

If there are no startup errors, the behaviour will not change.
2023-07-30 21:28:35 +02:00
Christian Boltz
b570e6134c
Add new python versions to logprof.conf
Adding everything up to 3.19 should make the file future-proof for a
while ;-)

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/193
2021-08-25 13:50:28 +02:00
Steve Beattie
05547ac8f6
treewide: spelling fix in logprof.conf and profile comments
Kept separate from other fixes because conf file changes can cause
problems for packagers.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/687
2020-12-01 12:47:23 -08:00
Christian Boltz
256f55925c
Drop profile repo code from utils
The profile repo is dead since years and most likely won't come back, so
there's no point in keeping and maintaining the code for uploading and
downloading profiles.
2020-05-05 13:09:16 +02:00
Emerson Bernier
00871696f1 add zsh to logprof.conf 2018-09-24 16:51:11 +00:00
Christian Boltz
db096135eb
add python3.7 to logprof.conf 2018-09-15 00:32:48 +02:00
intrigeri
a32a9aa6d1 Add python3.6 line to utils/logprof.conf.
Patch by Adam Conrad <adconrad@ubuntu.com>.
2017-10-23 16:31:25 +02:00
Christian Boltz
00cd706086 Also add python 3.5 to logprof.conf
Acked-by: Kshitij Gupta <kgupta8592@gmail.com> for 2.9, 2.10 and trunk
2015-11-19 20:22:40 +01:00
Christian Boltz
b7c2ee19b7 Add python to the "no Px rule" list in logprof.conf
To make things more interesting, /usr/bin/python and /usr/bin/python[23]
are symlinks to /usr/bin/python[23].[0-9], so we have to explicitely
list several versions.


Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com> for 2.9, 2.10 and trunk
2015-11-18 13:39:07 +01:00
Jamie Strandboge
502e992c42 Update perl abstraction, logprof.conf, severity.db and tests for Debian/Ubuntu
perl multiarch paths

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-08-20 19:14:24 -05:00
Christian Boltz
8b802b3fe6 update logprof.conf for UsrMove
logprof.conf contains a list of binaries in the [qualifiers] section 
that should for example never have their own profile.

Since some distributions moved lots of files from /bin/ to /usr/bin/ 
("UsrMove"), this list is outdated.

The patch adds copies of all /bin/ (and /sbin/) lines with /usr 
prepended.

Acked-by: John Johansen <john.johansen@canonical.com>
2014-02-02 15:12:32 +01:00
Christian Boltz
5ae05cc2f4 Install extra profiles in /usr/share/apparmor/extra-profiles/ instead of
/etc/apparmor/profiles/extras/, and update the path at various places.

Also update the mailinglist address in extra-profiles README and 
recommend cp instead of mv.

Note: if you want to have a symlink 
    /etc/apparmor/profiles/extras -> /usr/share/apparmor/extra-profiles/
for backward compability, you'll have to create it yourself (for example
in the .spec file)

This also fixes https://bugzilla.novell.com/show_bug.cgi?id=713647


Acked-by: John Johansen <john.johansen@canonical.com>
2012-09-27 23:57:21 +02:00
Kees Cook
843ef93202 As /var/log/messages has been phased out, start preferring syslog
instead.

Needed at least on upgraded Ubuntu machines that went from messages to
syslog recently. If this causes problems, we can easily revert it.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-18 18:17:22 -05:00
Kees Cook
723a20ba7d as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Kees Cook
6fa3406b0e update more documentation, update Debian start-up script for LSB, flip logprof repo 2009-11-11 10:51:05 -08:00
Steve Beattie
32696e32bc Things will also be painfully broken if there's a profile for /bin/dash,
which serves as /bin/sh on ubuntu.
2008-11-06 22:48:32 +00:00
John Johansen
8d3ff10db1 Update the utils profile restrictions so that cx and named transitions can be
used on utility programs
2008-05-30 07:21:15 +00:00
John Johansen
d85344df63 add support for user rules 2008-04-18 21:16:15 +00:00
John Johansen
c6666773d9 update config to point the repo to 11.0 2008-04-10 08:51:29 +00:00
Dominic Reynolds
27c13607be Change the default repository to
http://apparmor.opensuse.org/backend/api - the host for the production
repository.
2007-09-17 02:28:26 +00:00
Dominic Reynolds
5c373ea077 Remove default/required hats for ssh in logprof.conf 2007-08-17 19:54:57 +00:00
Steve Beattie
4c1effc3a2 Make the location of logger configurable via /etc/apparmor/logprof.conf 2007-08-14 22:07:40 +00:00
Dominic Reynolds
c8c8ca442c Repository fixes for tools.
- Ask Me Later option for enabling the repository not working  
 - Cleanup the syncronization code with the repository - ensure that 
   mofications are presented correctly as adds/changes to the users profile
   set
 - Correct bug in marking profiles as NEVERSUBMIT  
 - Fix bug in serlializing profiles with hats (was adding the globals
   #include above each hat - ick)
 - Added dialog and config handling code to enable user to choose the mode of
   usage of the profile repository: download only or upload new/changed
   profiles - so that they user isn't repeatedly prompted to sign in to the
   repository
 - Set default configuration for the repository to apparmor.test.opensuse.org
2007-07-13 17:53:12 +00:00
Dominic Reynolds
e0e441ac72 - Minor formatting
- use ENV{PAGER}
- chmod use changes to prevent races writing config files
- add preferred user (NOVELL) as config option in logprof.conf and sort
  profiles from repo so that preferred user is the default and first in
  the list
2007-05-22 20:49:51 +00:00
Dominic Reynolds
08a4da1016 Add support to make the profiles in /etc/apparmor/profiles/extras
usable directly from genprof/logprof when new profiles are needed.
2007-04-26 02:59:17 +00:00
Dominic Reynolds
d27ff99e31 Changes to add support for the AppArmor profile repository to the
console UI tools. (jmichael)
2007-04-26 02:48:24 +00:00
Dominic Reynolds
7fb70b4b22 Refactor/cleanup reading/writing and handling of configuration options
in logprof.conf (jmichael)
2007-04-25 21:06:52 +00:00
Steve Beattie
1fa3f61c6a Fix from PLD/Arkadiusz Miskiewicz <arekm@maven.pl> to mark ksh to not be
profiled.
2006-12-12 11:05:46 +00:00
Dominic Reynolds
1fe7e92955 Added checks for profile syntax and error dialogs in the yastui. 2006-10-05 21:29:22 +00:00
Steve Beattie
09f7264743 Set svn:keywords attributes on files, modify makefiles to point at new
common/ location after converting to novell forge svn repo.
2006-04-12 19:31:08 +00:00
Steve Beattie
6d3e74907d Import the rest of the core functionality of the internal apparmor
development tree (trunk branch). From svn repo version 6381.
2006-04-11 21:52:54 +00:00