Commit Graph
5 Commits
Author SHA1 Message Date
Harry Ciao 4bc6c2d5d8 SELinux: Auto-generate security_is_socket_class
The security_is_socket_class() is auto-generated by genheaders based
on classmap.h to reduce maintenance effort when a new class is defined
in SELinux kernel. The name for any socket class should be suffixed by
"socket" and doesn't contain more than one substr of "socket".

Signed-off-by: Harry Ciao <[email protected]>
Signed-off-by: Eric Paris <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
2011-03-03 15:19:43 -05:00
James Morris 310de047ee selinux: fix warning in genheaders
Fix const warning in the genheaders script as a result of
changes to the headers, as noted here:

http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-03/msg03977.html

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: James Morris <[email protected]>
2010-03-16 08:47:36 +11:00
Eric Paris 85c3b529f8 SELinux: header generation may hit infinite loop
If a permission name is long enough the selinux class definition generation
tool will go into a infinite loop.  This is because it's macro max() is
fooled into thinking it is dealing with unsigned numbers.  This patch makes
sure the macro always uses signed number so 1 > -1.

Signed-off-by: Eric Paris <[email protected]>
Signed-off-by: James Morris <[email protected]>
2009-11-23 09:00:44 +11:00
Alan Cox 821d35a560 selinux: Fix warnings
scripts/selinux/genheaders/genheaders.c:20: warning: no previous prototype
for ?usage?
scripts/selinux/genheaders/genheaders.c:26: warning: no previous prototype
for ?stoupperx?

Signed-off-by: Alan Cox <[email protected]>
Acked-by: WANG Cong <[email protected]>
Signed-off-by: James Morris <[email protected]>
2009-11-19 09:08:44 +11:00
Stephen Smalley 8753f6bec3 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 <[email protected]>
Signed-off-by: James Morris <[email protected]>
2009-10-07 21:56:44 +11:00