diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2009-09-30 19:41:02 +0200 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-10-07 12:56:44 +0200 |
commit | 8753f6bec352392b52ed9b5e290afb34379f4612 (patch) | |
tree | b5f381be9f56125309bfbfcaa73d68e08c309747 /security/selinux/Makefile | |
parent | selinux: dynamic class/perm discovery (diff) | |
download | linux-8753f6bec352392b52ed9b5e290afb34379f4612.tar.xz linux-8753f6bec352392b52ed9b5e290afb34379f4612.zip |
selinux: generate flask headers during kernel build
Add a simple utility (scripts/selinux/genheaders) and invoke it to
generate the kernel-private class and permission indices in flask.h
and av_permissions.h automatically during the kernel build from the
security class mapping definitions in classmap.h. Adding new kernel
classes and permissions can then be done just by adding them to classmap.h.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/Makefile')
-rw-r--r-- | security/selinux/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/security/selinux/Makefile b/security/selinux/Makefile index d47fc5e545e0..f013982df417 100644 --- a/security/selinux/Makefile +++ b/security/selinux/Makefile @@ -18,5 +18,13 @@ selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o selinux-$(CONFIG_NETLABEL) += netlabel.o -EXTRA_CFLAGS += -Isecurity/selinux/include +EXTRA_CFLAGS += -Isecurity/selinux -Isecurity/selinux/include +$(obj)/avc.o: $(obj)/flask.h + +quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h + cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h + +targets += flask.h +$(obj)/flask.h: $(src)/include/classmap.h FORCE + $(call if_changed,flask) |