1 ccsecurity-objs := permission.o gc.o memory.o 2 3 ifeq ($(VERSION)$(PATCHLEVEL),24) 4 5 ifdef CONFIG_CCSECURITY 6 O_TARGET := ccsecurity.o 7 ifdef CONFIG_CCSECURITY_LKM 8 all_targets: load_policy.o 9 obj-m := ccsecurity.o 10 obj-y := $(ccsecurity-objs) 11 else 12 all_targets: ccsecurity.o 13 obj-y := load_policy.o $(ccsecurity-objs) 14 endif 15 export-objs := load_policy.o 16 endif 17 include $(TOPDIR)/Rules.make 18 19 policy/profile.conf: 20 @mkdir -p policy/ 21 @echo Creating an empty policy/profile 22 @touch $@ 23 24 policy/exception_policy.conf: 25 @mkdir -p policy/ 26 @echo Creating a default policy/except 27 @echo initialize_domain /sbin/modprobe 28 @echo initialize_domain /sbin/hotplug 29 30 policy/domain_policy.conf: 31 @mkdir -p policy/ 32 @echo Creating an empty policy/domain_ 33 @touch $@ 34 35 policy/manager.conf: 36 @mkdir -p policy/ 37 @echo Creating an empty policy/manager 38 @touch $@ 39 40 policy/stat.conf: 41 @mkdir -p policy/ 42 @echo Creating an empty policy/stat.co 43 @touch $@ 44 45 builtin-policy.h: policy/profile.conf policy/e 46 @echo Generating built-in policy for T 47 @echo "static char ccs_builtin_profile 48 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 49 @echo "\"\";" >> $@.tmp 50 @echo "static char ccs_builtin_excepti 51 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 52 @echo "\"\";" >> $@.tmp 53 @echo "static char ccs_builtin_domain_ 54 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 55 @echo "\"\";" >> $@.tmp 56 @echo "static char ccs_builtin_manager 57 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 58 @echo "\"\";" >> $@.tmp 59 @echo "static char ccs_builtin_stat[] 60 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 61 @echo "\"\";" >> $@.tmp 62 @mv $@.tmp $@ 63 64 policy_io.o: builtin-policy.h 65 66 else 67 68 obj-y += load_policy.o 69 ifdef CONFIG_CCSECURITY_LKM 70 obj-m += ccsecurity.o 71 else 72 obj-y += ccsecurity.o 73 endif 74 75 $(obj)/policy/profile.conf: 76 @mkdir -p $(obj)/policy/ 77 @echo Creating an empty policy/profile 78 @touch $@ 79 80 $(obj)/policy/exception_policy.conf: 81 @mkdir -p $(obj)/policy/ 82 @echo Creating a default policy/except 83 @echo initialize_domain /sbin/modprobe 84 @echo initialize_domain /sbin/hotplug 85 86 $(obj)/policy/domain_policy.conf: 87 @mkdir -p $(obj)/policy/ 88 @echo Creating an empty policy/domain_ 89 @touch $@ 90 91 $(obj)/policy/manager.conf: 92 @mkdir -p $(obj)/policy/ 93 @echo Creating an empty policy/manager 94 @touch $@ 95 96 $(obj)/policy/stat.conf: 97 @mkdir -p $(obj)/policy/ 98 @echo Creating an empty policy/stat.co 99 @touch $@ 100 101 $(obj)/builtin-policy.h: $(obj)/policy/profile 102 @echo Generating built-in policy for T 103 @echo "static char ccs_builtin_profile 104 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 105 @echo "\"\";" >> $@.tmp 106 @echo "static char ccs_builtin_excepti 107 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 108 @echo "\"\";" >> $@.tmp 109 @echo "static char ccs_builtin_domain_ 110 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 111 @echo "\"\";" >> $@.tmp 112 @echo "static char ccs_builtin_manager 113 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 114 @echo "\"\";" >> $@.tmp 115 @echo "static char ccs_builtin_stat[] 116 @sed -e 's/\\/\\\\/g' -e 's/\"/\\"/g' 117 @echo "\"\";" >> $@.tmp 118 @mv $@.tmp $@ 119 120 $(obj)/policy_io.o: $(obj)/builtin-policy.h 121 122 $(obj)/check_security_file_ioctl_compat.h: $(s 123 @echo Checking whether security_file_i 124 @grep -q security_file_ioctl_compat $( 125 @mv $@.tmp $@ 126 127 $(obj)/load_policy.o: $(obj)/check_security_fi 128 129 endif
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.