mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-06 09:21:00 +01:00

This patch adds very limited support for very dumb parsing of dbus rules. Basically, it stores dbus rules as raw strings wrapped in a class. There's class structure to indicate how I'd like to see fuller future support for dbus rules to be implemented and act as a guidepost for how to handle most rules, moving away from the giant structure of nested dictionaries. A stub test script is included as well, with a modification to the make check target to set the PYTHONPATH to point in the right place. With this patch, aa-audit, aa-autodep, aa-complain, aa-disable, and aa-enforce all function for me. aa-logprof and aa-genprof have functionality issues for me at the moment (one of them dumps a backtrace even without this patch), and I'm not sure the writing out of dbus rules is completely implemented for modified profiles. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Seth Arnold <seth.arnold@canonical.com>
41 lines
1.3 KiB
Makefile
41 lines
1.3 KiB
Makefile
# ----------------------------------------------------------------------
|
|
# Copyright (c) 1999, 2004-2009 NOVELL (All rights reserved)
|
|
# Copyright (c) 2010-2014 Canonical Ltd.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, contact Novell, Inc.
|
|
# ----------------------------------------------------------------------
|
|
NAME = apparmor-utils
|
|
all:
|
|
COMMONDIR=../../common/
|
|
|
|
include common/Make.rules
|
|
|
|
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
|
|
ifeq ($(COMMONDIR_EXISTS), true)
|
|
common/Make.rules: $(COMMONDIR)/Make.rules
|
|
ln -sf $(COMMONDIR) .
|
|
endif
|
|
|
|
.PHONY: clean
|
|
ifndef VERBOSE
|
|
.SILENT: clean
|
|
endif
|
|
clean: _clean
|
|
rm -rf __pycache__/ common
|
|
|
|
.PHONY: check
|
|
ifndef VERBOSE
|
|
.SILENT: check
|
|
endif
|
|
check:
|
|
export PYTHONPATH=.. ; $(foreach test, $(wildcard test-*.py), $(call pyalldo, $(test)))
|