The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries? f.ben.isaac High Level Programming 12 11-14-2008 11:25 AM
C/C++ compiler ver 6 on AIX 5.3 - errors satguyz AIX 2 04-01-2006 01:17 AM
fedora core 2 selinux problem the.last.soul Linux 1 07-08-2005 02:54 PM
SElinux moxxx68 UNIX for Advanced & Expert Users 1 04-14-2005 08:56 PM
gcc Compiler Switches: giving Illogical Errors Ahsan High Level Programming 1 08-25-2003 10:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-04-2009
septima.pars's Avatar
septima.pars septima.pars is offline
Registered User
  
 

Join Date: Jan 2009
Location: Chicago
Posts: 31
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:

Quote:
You will .. need a policy configuration and a labeled filesystem.
...obtain the policy compiler (checkpolicy), the utility for
labeling filesystems (setfiles), and an example policy configuration
from Security-Enhanced Linux
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

Code:

[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?

mouse
  #2 (permalink)  
Old 01-05-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
The problem is the first error message. GCC doesn't exit immediately because maybe the package will compile without it. But it doesn't:
Code:
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.
  #3 (permalink)  
Old 01-05-2009
septima.pars's Avatar
septima.pars septima.pars is offline
Registered User
  
 

Join Date: Jan 2009
Location: Chicago
Posts: 31
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...

Which Unix Certification is the most needed these days?


Quote:
...Want to be great at UNIX? Get a version of UNIX (Linux, BSD, whatever), build a server from scratch and start building and writing C code. Get Rich Stevens books on system level programming and learn to program at the system level. Write your own server and client code, debug the code, work on interprocess communications, debug memory leaks, build shared libs, build static libs, fix corrupt file systems, etc....


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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0