Commit graph

34 commits

Author SHA1 Message Date
Steve Beattie
e61d8bda60 utils: have make clean purge python3 __pycache__ dir in apparmor/ 2014-02-13 11:54:42 -08:00
Steve Beattie
3b726b996d utils: no need to run pyflakes on aa-status twice 2014-02-13 11:01:29 -08:00
Steve Beattie
bf655b530f Fix make install to handle new python binaries, as well as informing
setuptools to install the entire apparmor python package.
2014-02-13 00:04:39 -08:00
Steve Beattie
d1791ff286 Description: clean out test dir python cache directory
Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2013-08-12 17:55:45 -07:00
Dmitrijs Ledkovs
dac3c00862 Initial port to python3 for utilities. 2012-06-11 17:56:21 +01:00
Jamie Strandboge
1db463f4de This patchset is broken into 4 parts:
* the application, library, documentation and installation script
* the initial templates and policy groups. This will undoubtedly need
  refinement as we get feedback from users. Initial policy is based on Ubuntu's
  Application Review Board (ARB) requirements[2].
* tests for the library
* Makefile integration

Templates are stored in /usr/share/apparmor/easyprof/templates and policy
groups in /usr/share/apparmor/easyprof/policygroups. This can be adjusted via
/etc/apparmor/easyprof.conf.

The aa-easyprof.pod has complete documentation on usage with some
additional information in utils/easyprof/README (mostly duplicated
here).

Testing can be performed in a number of ways:
$ cd utils ; make check # runs unit tests and pyflakes

Unit tests manually:
$ ./test/test-aa-easyprof.py

In source manual testing:
$ ./aa-easyprof --templates-dir=./easyprof/templates \
                --policy-groups-dir=./easyprof/policygroups \
                ... \
                /opt/foo/bin/foo

Post-install manual testing:
$ make DESTDIR=/tmp/test PERLDIR=/tmp/test/usr/share/perl5/Immunix install
$ cd /tmp/test
$ PYTHONPATH=/tmp/test/usr/local/.../dist-packages ./usr/bin/aa-easyprof \
    --templates-dir=/tmp/test/usr/share/apparmor/easyprof/templates \
    --policy-groups-dir=/tmp/test/usr/share/apparmor/easyprof/policygroups \
    /opt/bin/foo

(you may also adjust /tmp/test/etc/apparmor/easyprof.conf to avoid
specifying --templates-dir and --policy-groups-dir).

Committing this now based on conversation with John and Steve.

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-07 22:37:48 -07:00
Steve Beattie
daa5b9f496 Subject: aa-logprof - fix handling of 'exec' events (LP: #872446)
Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/872446

Due to logging changes for 'exec' events, 'exec' events in aa-logprof
were being skipped when a profile is in enforcing mode. This patch
addresses the issue.

Bug: https://launchpad.net/bugs/872446
2012-03-27 17:15:50 -07:00
Jamie Strandboge
93308e4a29 Use linux/capability.h instead of sys/capability.h
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 16:41:08 -05:00
Steve Beattie
1439d006cd Subject: add apparmor.vim install target to utils/ install
This patch adds a make install target for the generated apparmor.vim
file, installing by default into /usr/share/apparmor based on IRC
discussions; alternate suggestions welcome. (Installing directly
into the vim syntax tree is difficult as the system path by default
contains the vim version number.)
2012-03-22 13:27:29 -07:00
Steve Beattie
b4feb99841 Subject: rewrite apparmor.vim generation and integrate into build
This patch replaces the apparmor.vim generating script with a python
version that eliminates the need for using the replace tool from the
mysql-server package. It makes use of the automatically generated
lists of capabilities and network protocols provided by the build
infrastructure. I did not capture all the notes and TODOs that
Christian had in the shell script; I can do so if desired.

It also hooks the generation of the apparmor.vim file into the utils/
build and clean stages.
2012-03-22 13:26:20 -07:00
Steve Beattie
a31e1349ce Subject: utils/: add check to ensure severity.db contains all
capabilities

This patch adds a new make target, check_severity_db, to the
utils/Makefile. It greps the severity.db for the presence of each
capability, as computed by the newly abstracted out variable in
common/Make.rules, and issues a build time error if it finds any
missing.

It also silences the check targets, so that only the output from them
will be emitted.
2012-03-22 13:23:19 -07:00
John Johansen
2f603cc73e Add the aa-exec command line utility
The aa-exec command can be used to launch an application under a specified
confinement, which may be different for what regular profile attachment
would apply.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-20 11:45:13 -07:00
John Johansen
e91cc118df Author: Michael (kensington)
When running installing apparmor-utils from Makefile, some warnings are
generated: make[1]: warning: jobserver unavailable: using -j1. Add
 `+' to parent make rule.

Use $(MAKE) instead of make

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-11-10 09:27:29 -08:00
Christian Boltz
23df761b70 Make the VENDOR_PERL directoy autodetected in utils/Makefile instead of
hardcoding it.

Acked-by: Kees Cook <kees@ubuntu.com>
2011-09-15 20:17:58 +02:00
Christian Boltz
6a80641ee2 perl modules don't need execute permissions.
This patch installs the perl modules with mode 644 instead of 755.

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-09-13 20:58:24 +02:00
Marc Deslauriers
b9bfc10d0f - added new aa-status tool rewritten in Python
- moved old Perl aa-status tool to the deprecated directory
2011-05-27 15:08:50 -04:00
Steve Beattie
fb8d5d05dc From: Jeff Mahoney <jeffm@suse.com>
utils/Makefile: abstract out the perl vendor location for distros to
override if necessary
2011-02-08 10:39:44 -08:00
Jamie Strandboge
1459c9eb20 add aa-disable 2011-02-07 17:39:36 -06:00
Kees Cook
14d8bac7b2 Here's an update to rename another chunk of things that still used
"SubDomain" in some way. This leaves only "subdomain.conf" and the
function names internally.

Additionally, I added a "make check" rule to the utils/Makefile to do a
simple "perl -c" sanity check just for good measure.
2011-01-13 13:58:26 -08:00
Kees Cook
dd3a964249 drop /var/log/apparmor, stop installing Reports.pm, use LOGPROF_DEBUG as the debugging target instead of /var/log/apparmor 2011-01-13 09:13:34 -08:00
Kees Cook
723a20ba7d as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Kees Cook
38cefc358a add symlink for manpage as well 2010-11-04 13:36:38 -07:00
Kees Cook
6d2d55057c retain one backward compat symlink for the heavily-documented "apparmor_status" command 2010-11-04 11:52:33 -07:00
Kees Cook
6717e29909 Here is a patch to standardize on all utils using the "aa-" prefix instead
of a mix of symlinks to non-prefixed comands, and "apparmor_" prefixed
commands.

This also refactors the manpage generation slightly since we no longer
need special cases for the manpages, and drops aa-eventd from the default
list of tools to install (it also lacks a manpage).
2010-11-03 17:03:52 -07:00
Jamie Strandboge
a58c1b5119 utils/Makefile: install apparmor_notify
add utils/apparmor_notify.pod
2010-02-12 10:14:11 -06: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
John Johansen
0562961d71 repo-refactor.diff - Refactor the basic repository communication
routines into a standalone perl module.
                            Factor out the config file reading/writing into a
                            standalone perl module. The goal here was to
                            start to break out some of the basic routines
                            that the tools use into their own independent
                            modules.
2008-02-26 12:00:37 +00:00
Seth Arnold
0c9d1c44ed new audit manpage from Mathias Gug 2007-08-15 21:43:40 +00:00
Steve Beattie
feb167c51a Move some common manpage cleanup to common/Make.rules (and clean up
pod2html tmpfiles). Also mark manpages to be ignored by svn.
2007-04-03 20:12:16 +00:00
Steve Beattie
60f2312372 Subject: Add manpages to utils package.
Move the autodep(8), complain(8), enforce(8), logprof(8), genprof(8),
unconfined(8), logprof.conf(5), and apparmor_status(8) manpages, along
with their aa- form symlinks, to the utils package.
2007-04-03 19:13:35 +00:00
Steve Beattie
4f16824434 This patch makes it so that translations added to po/ directories are
automatically added to the set of languages to be built and installed
unless they are explicitly added to the set of disabled translations.
This eliminates the need to manually add a lang to the Makefile when a
new translation is submitted (svn add will still be necessary).
2006-11-15 09:22:15 +00:00
Steve Beattie
af33afe8f7 Convert the rest of the packages to symlinking in the common directory
so that 'make dist' will work.
2006-11-04 21:34:47 +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