LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-17-2014, 01:11 PM   #1
goluhaque
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Rep: Reputation: Disabled
Question Problems in building a LSM


Background: So, I am not really experienced in using Linux, although I have done a little of bash scripting here and there and some other things. I am building a small RBAC LSM based on the framework, and have never before built a module in Linux.

Problem: I decided to build a small skeleton LSM, but when I try to compile it(only a single file as of now), gcc is unable to find a whole lot of header files in /usr/include/linux. I tried to locate those header files(found under /usr/src/kernels/<version>/include). I tried to include that location when compiling the program by using the -I option.

Code:
gcc -I<path> <filename>.c
I still get the same error(with using a space between -I and path and w/o too).

Here is the output from the above command. Not directly pasting it in here since I also used the -v option and the output is huge.
[Pastebin link].


Pastebin link

Here is the output of locate linux/init.h

Code:
/usr/src/kernels/2.6.32-431.23.3.el6.x86_64/include/linux/init.h
Uninstalled then installed gcc back again. Same result.

When I moved all files from the aforementioned location to the default location, other errors are coming.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How does the LSM Framework works ktandel Linux - Security 1 05-14-2014 01:23 PM
lg lsm 100 , scanner mouse sulekha Ubuntu 1 11-25-2013 07:49 AM
why can't LSM's homepage be accessed? weiguixm Linux - General 1 10-10-2008 11:09 PM
Lsm krishna_123 Linux - Kernel 0 08-28-2008 01:14 AM
realtime-lsm denzo74 Mandriva 0 08-11-2004 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration