Skip to content

Commit 2bbb067

Browse files
committed
Merge tag 'tomoyo-pr-20230117' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1
Pull tomoyo fixes from Tetsuo Handa: "Makefile and Kconfig updates for TOMOYO" * tag 'tomoyo-pr-20230117' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: Update website link tomoyo: Remove "select SRCU" tomoyo: Omit use of bin2c tomoyo: avoid unneeded creation of builtin-policy.h tomoyo: fix broken dependency on *.conf.default
2 parents 6e50979 + fa17087 commit 2bbb067

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

security/tomoyo/Kconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ config SECURITY_TOMOYO
66
select SECURITYFS
77
select SECURITY_PATH
88
select SECURITY_NETWORK
9-
select SRCU
10-
select BUILD_BIN2C
119
default n
1210
help
1311
This selects TOMOYO Linux, pathname-based access control.
1412
Required userspace tools and further information may be
15-
found at <http://tomoyo.sourceforge.jp/>.
13+
found at <https://tomoyo.osdn.jp/>.
1614
If you are unsure how to answer this question, answer N.
1715

1816
config SECURITY_TOMOYO_MAX_ACCEPT_ENTRY

security/tomoyo/Makefile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
obj-y = audit.o common.o condition.o domain.o environ.o file.o gc.o group.o load_policy.o memory.o mount.o network.o realpath.o securityfs_if.o tomoyo.o util.o
33

44
targets += builtin-policy.h
5-
define do_policy
6-
echo "static char tomoyo_builtin_$(1)[] __initdata ="; \
7-
$(objtree)/scripts/bin2c <$(firstword $(wildcard $(obj)/policy/$(1).conf $(srctree)/$(src)/policy/$(1).conf.default) /dev/null); \
8-
echo ";"
9-
endef
10-
quiet_cmd_policy = POLICY $@
11-
cmd_policy = ($(call do_policy,profile); $(call do_policy,exception_policy); $(call do_policy,domain_policy); $(call do_policy,manager); $(call do_policy,stat)) >$@
125

13-
$(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(src)/policy/*.conf.default) FORCE
6+
quiet_cmd_policy = POLICY $@
7+
cmd_policy = { \
8+
$(foreach x, profile exception_policy domain_policy manager stat, \
9+
printf 'static char tomoyo_builtin_$x[] __initdata =\n'; \
10+
sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' -e 's/\(.*\)/\t"\1\\n"/' -- $(firstword $(filter %/$x.conf %/$x.conf.default, $^) /dev/null); \
11+
printf '\t"";\n';) \
12+
} > $@
13+
14+
$(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(srctree)/$(src)/policy/*.conf.default) FORCE
1415
$(call if_changed,policy)
1516

17+
ifndef CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
1618
$(obj)/common.o: $(obj)/builtin-policy.h
19+
endif

0 commit comments

Comments
 (0)