From b8a8482fac44fea2c34fabae0455094ed300a210 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Tue, 23 Oct 2012 10:04:10 +0000 Subject: search for optional policies in /etc/awall/optional --- Makefile | 6 ++++-- awall/policy.lua | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 51dd0e1..3cd39e5 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ ROOT_DIR := / LUA_VERSION := 5.1 poldir := usr/share/awall +confdir := etc/awall all: install @@ -38,9 +39,10 @@ $(eval $(call copy,json,$(poldir)/mandatory,json)) $(eval $(call rename,awall-cli,usr/sbin/awall,755)) $(eval $(call rename,sample-policy.json,$(poldir)/sample/sample-policy.json,644)) -$(eval $(call mkdir,etc/awall)) -$(eval $(call mkdir,var/run/awall)) +$(eval $(call mkdir,$(confdir))) +$(eval $(call mkdir,$(confdir)/optional)) $(eval $(call mkdir,$(poldir)/optional)) +$(eval $(call mkdir,var/run/awall)) install: $(foreach f,$(files),$(ROOT_DIR)/$(f)) diff --git a/awall/policy.lua b/awall/policy.lua index 7c041b4..f2ebee0 100644 --- a/awall/policy.lua +++ b/awall/policy.lua @@ -113,7 +113,8 @@ PolicySet = awall.object.class() function PolicySet:init(confdirs, importdirs) self.autodirs = confdirs or {'/usr/share/awall/mandatory', '/etc/awall'} self.confdir = self.autodirs[#self.autodirs] - self.importdirs = importdirs or {'/usr/share/awall/optional'} + self.importdirs = importdirs or {'/usr/share/awall/optional', + '/etc/awall/optional'} end -- cgit v1.2.3