SELinux policy compiler errors for 2.6.26.8.tex1

Hello all!

I am trying to enable SELinux on bootup for my supported kernel
2.6.26.8.tex1

I am running PCLinuxOS 2009 Beta 2 which is based on Mandriva/Mandrake

From my reading, I know that I am able to set SELinux to boot (preferably in passive mode) however this would still 'change' my files; therefore I would need to run the utility/command: "setfiles"

setfiles
_____________________________________________

The problem I am having relates to the supporting files needed to run the application effectively. For my linux distribution, the config/info file is located here:

/usr/src/linux-2.6.26.8.tex1/security/selinux/Kconfig

It states:

downloading the needed packages from
Download stable SELinux release,
I then try to compile but receive numerous errors such as this example for the checkpolicy package (which contains the setfiles) command

[root@localhost checkpolicy-1.34.7]# make -f Makefile
cc -g -Wall -Werror -O2 -pipe -fno-strict-aliasing -I. -I/usr/include -o checkpolicy.o -c checkpolicy.c
checkpolicy.c:73:37: error: sepol/policydb/policydb.h: No such file or directory
checkpolicy.c:74:37: error: sepol/policydb/services.h: No such file or directory
checkpolicy.c:75:40: error: sepol/policydb/conditional.h: No such file or directory
checkpolicy.c:76:38: error: sepol/policydb/hierarchy.h: No such file or directory
checkpolicy.c:77:34: error: sepol/policydb/flask.h: No such file or directory
checkpolicy.c:78:35: error: sepol/policydb/expand.h: No such file or directory
checkpolicy.c:79:33: error: sepol/policydb/link.h: No such file or directory
In file included from checkpolicy.c:82:
checkpolicy.h:4:36: error: sepol/policydb/ebitmap.h: No such file or directory
In file included from checkpolicy.c:82:
checkpolicy.h:7: error: expected specifier-qualifier-list before �ebitmap_t'
In file included from checkpolicy.c:83:
parse_util.h:33: error: expected �)' before �*' token

...

checkpolicy.c:1011: warning: format �%s' expects type �char *', but argument 4 has type �int'
checkpolicy.c:1019: warning: implicit declaration of function �strcpy'
checkpolicy.c:1019: warning: incompatible implicit declaration of built-in function �strcpy'
checkpolicy.c:1022: warning: format �%s' expects type �char *', but argument 4 has type �int'
checkpolicy.c:392: warning: unused variable �pf'
checkpolicy.c:376: warning: unused variable �avd'
make: *** [checkpolicy.o] Error 1

I turns out I am unable to compile any of the packages. Am I missing something very obvious or is this because of all the changes the kernel versions go through in relation to drivers?

_________________________________________

At this point, I am seriously considering just building the kernel from scratch but my question is, if i am to do this, how difficult would it be to 'copy' the final working settings from this configuration into my boot sequence for my present distribution? Would this be unnecessarily messy? Any other suggestions? :confused:

mouse

The problem is the first error message. GCC doesn't exit immediately because maybe the package will compile without it. But it doesn't:

checkpolicy.c:73:37: error: sepol/policydb/policydb.h: No such file or directory
checkpolicy.c:74:37: error: sepol/policydb/services.h: No such file or directory
checkpolicy.c:75:40: error: sepol/policydb/conditional.h: No such file or directory

These should have been included, but perhaps they weren't, perhaps they are generated through "configure", or perhaps they are in a separate package.

Thanks for the heads up otheus.

i'm just going to go ahead and learn some C. I figure it can't hurt me to learn at least enough to fix syntatical errors and the like when compiling new programs. But I also read Neo's post from a previous thread and my interest was piqued...

http://www.unix.com/unix-dummies-questions-answers/1435-unix-certification-most-needed-these-days.html

Maybe this will be part of my new year's resolution : )