~ubuntu-branches/ubuntu/saucy/apparmor/saucy

« back to all changes in this revision

Viewing changes to .pc/0052-parser-Binary-profile-equality-tests-for-DBus-rules.patch/parser/tst/Makefile

  • Committer: Package Import Robot
  • Author(s): Tyler Hicks, Tyler Hicks, Jamie Strandboge
  • Date: 2013-08-26 15:32:12 UTC
  • mfrom: (49.1.6 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130826153212-5oehf9eda64lkpze
Tags: 2.8.0-0ubuntu25
[ Tyler Hicks ]
* Add support for mediation of D-Bus messages and services. AppArmor D-Bus
  rules are described in the apparmor.d(5) man page. dbus-daemon will use
  libapparmor to perform queries against the AppArmor policies to determine
  if a connection should be able to send messages to another connection, if
  a connection should be able to receive messages from another connection,
  and if a connection should be able to bind to a well-known name.
  - 0042-Fix-mount-rule-preprocessor-output.patch,
    0043-libapparmor-Safeguard-aa_getpeercon-buffer-reallocat.patch,
    0044-libapparmor-fix-return-value-of-aa_getpeercon_raw.patch,
    0045-libapparmor-Move-mode-parsing-into-separate-function.patch,
    0046-libapparmor-Parse-mode-from-confinement-string-in-ge.patch,
    0047-libapparmor-Make-aa_getpeercon_raw-similar-to-aa_get.patch,
    0048-libapparmor-Update-aa_getcon-man-page-to-reflect-get.patch:
    Backport parser and libapparmor pre-requisites for D-Bus mediation
  - 0049-parser-Update-man-page-for-DBus-rules.patch: Update apparmor.d man
    page
  - 0050-parser-Add-support-for-DBus-rules.patch,
    0051-parser-Regression-tests-for-DBus-rules.patch,
    0052-parser-Binary-profile-equality-tests-for-DBus-rules.patch: Add
    apparmor_parser support for D-Bus mediation rules
  - 0053-libapparmor-Export-a-label-based-query-interface.patch,
    debian/libapparmor1.symbols: Provide the libapparmor interface necessary
    for trusted helpers to make security decisions based upon AppArmor
    policy
  - 0054-libaalogparse-Parse-dbus-daemon-audit-messages.patch,
    0055-libaalogparse-Regression-tests-for-dbus-daemon-audit.patch: Allow
    applications to parse denials, generated by dbus-daemon, using
    libaalogparse and add a set of regression tests
  - 0056-tests-Add-an-optional-final-check-to-checktestfg.patch,
    0057-tests-Add-required-features-check.patch,
    0058-tests-Add-regression-tests-for-dbus.patch: Add regression tests
    which start their own dbus-daemon, load profiles containing D-Bus rules,
    and confine simple D-Bus service and client applications
  - 0059-dbus-rules-for-dbus-abstractions.patch: Add bus-specific, but
    otherwise permissive, D-Bus rules to the dbus and dbus-session
    abstractions. Confined applications that use D-Bus should already be
    including these abstractions in their profiles so this should be a
    seamless transition for those profiles.
* 0060-utils-make_clean_fixup.patch: Clean up the Python cache in the
  AppArmor tests directory
* 0061-profiles-dnsmasq-needs-dbus-abstraction.patch: Dnsmasq uses the
  system D-Bus when it is started with --enable-dbus, so its AppArmor
  profile needs to include the system bus abstraction
* 0062-fix-clone-test-on-arm.patch: Fix compiler error when building
  regression tests on ARM
* 0063-utils-ignore-unsupported-rules.patch: Utilities that use the
  Immunix::AppArmor perl module, such as aa-logprof and aa-genprof, error
  out when they encounter rules unsupported by the perl module. This patch
  ignores unsupported rules.

[ Jamie Strandboge ]
* debian/control: don't have easyprof Depends on apparmor-easyprof-ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
PROVE=/usr/bin/prove
 
3
TESTS=simple.pl
 
4
PARSER_DIR=..
 
5
PARSER_BIN=apparmor_parser
 
6
PARSER=$(PARSER_DIR)/$(PARSER_BIN)
 
7
PROVE_ARG=-f
 
8
 
 
9
ifeq ($(VERBOSE),1)
 
10
  PROVE_ARG+=-v
 
11
endif
 
12
 
 
13
all: tests
 
14
 
 
15
.PHONY: tests error_output gen_xtrans parser_sanity caching minimize
 
16
tests: error_output gen_xtrans gen_dbus parser_sanity caching minimize
 
17
 
 
18
GEN_TRANS_DIRS=simple_tests/generated_x/ simple_tests/generated_perms_leading/ simple_tests/generated_perms_safe/ simple_tests/generated_dbus
 
19
 
 
20
gen_xtrans: $(GEN_TRANS_DIRS)
 
21
        ./gen-xtrans.pl
 
22
 
 
23
$(GEN_TRANS_DIRS):
 
24
        mkdir $@
 
25
 
 
26
gen_dbus: $(GEN_TRANS_DIRS)
 
27
        perl gen-dbus.pl
 
28
 
 
29
error_output: $(PARSER)
 
30
        $(PARSER) -S -I errors >/dev/null errors/okay.sd
 
31
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/single.sd | \
 
32
                grep -q "AppArmor parser error for errors/single.sd in errors/single.sd at line 3: Could not open 'failure'"
 
33
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/double.sd | \
 
34
                grep -q "AppArmor parser error for errors/double.sd in errors/includes/busted at line 66: Could not open 'does-not-exist'"
 
35
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/modefail.sd | \
 
36
                grep -q "AppArmor parser error for errors/modefail.sd in errors/modefail.sd at line 6: syntax error"
 
37
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/multi_include.sd | \
 
38
                grep -q "AppArmor parser error for errors/multi_include.sd in errors/multi_include.sd at line 12: Could not open 'failure'"
 
39
        @echo "Error Output: PASS"
 
40
 
 
41
parser_sanity: $(PARSER)
 
42
        $(Q)${PROVE} ${PROVE_ARG} ${TESTS}
 
43
 
 
44
caching: $(PARSER)
 
45
        LANG=C ./caching.sh
 
46
 
 
47
minimize: $(PARSER)
 
48
        LANG=C ./minimize.sh
 
49
 
 
50
$(PARSER):
 
51
        make -C $(PARSER_DIR) $(PARSER_BIN)
 
52
 
 
53
clean:
 
54
        find $(GEN_TRANS_DIRS) -type f | xargs rm -f