LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-29-2008, 12:27 AM   #1
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Rep: Reputation: 0
Help: Which file invokes policy configuration in RHEl4?


Hi,
I am working RHEL4 and want to know which file invokes the /etc/selinux/targeted/policy/policy.<ver> i.e a policy configuration file?
I have to make change to the interface file.
Thanks
 
Old 02-29-2008, 05:54 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
IIRC with "targeted" policy if you want to make changes you write a local policy that overrules whatever necessary?
 
Old 02-29-2008, 06:24 AM   #3
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: 0
Yes it's correct that we can't have Mandatory access control(MAC) over all the resources in the targeted mode but still we can have MAC over some Deamons like httpd, dhcpd.
For more information

http://www.redhat.com/magazine/006ap...tures/selinux/

But the real question is still there which file invokes Policy in RHEL?

Last edited by matrixdipu; 02-29-2008 at 06:26 AM.
 
Old 02-29-2008, 08:17 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
The config file,but it looks to me that you don't have your policy configured and that's way you can't see it.
 
Old 03-02-2008, 10:11 PM   #5
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: 0
The Policy has been configured and I can view it or can change it any time. The thing I want to know which file or script invokes or starts the policy configuration file.
 
Old 03-03-2008, 08:26 AM   #6
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Kernel does and then it pass it on to init.
 
Old 03-03-2008, 10:04 PM   #7
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: 0
Exactly the Kernel does and pass it on to init. I am finding out which file in kernel loads/invokes policy before passing it on to init.I have make changes to that file. If anyone finds it plz let me know. Thanks.
 
Old 03-05-2008, 01:37 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Moved: This thread is more suitable in the kernel forum and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 03-05-2008, 06:36 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by matrixdipu View Post
I am finding out which file in kernel loads/invokes policy before passing it on to init.I have make changes to that file.
Apparently init does with load_policy(), see IBM Developerworks: SELinux from scratch.
 
Old 03-06-2008, 12:46 AM   #10
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for the information. I have got some additional information regarding the loading of policy.

In the first step kernel checks for the version of policy in the file /selinux/policyvers.

Next part is done by init, init determines which policy is active in the /etc/selinux/config and then
loads the associated policy file at /etc/selinux/targeted/policy/policy.<ver>
 
Old 03-06-2008, 04:43 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by matrixdipu View Post
In the first step kernel checks for the version of policy in the file /selinux/policyvers.
Could you post that documents URI? I was under the impression you could only access the /selinux filesystem only once init made it available?
 
Old 03-06-2008, 04:56 AM   #12
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Could you post that documents URI? I was under the impression you could only access the /selinux filesystem only once init made it available?
This is the URI:

http://www.redhat.com/docs/manuals/e...tion-0016.html

The main reason to find the file which loads/invokes policy is to customize that particular file to load any customize policy files.
 
Old 03-06-2008, 05:18 AM   #13
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by matrixdipu View Post

The main reason to find the file which loads/invokes policy is to customize that particular file to load any customize policy files.
I think that you are trying to do something that can't be done.What you want to customize is just a line in a kernel or init,and the only thing that you can customize there is; will kernel load the policy or not.What you want to customize is nothing else then your policy.
 
Old 03-06-2008, 07:26 AM   #14
matrixdipu
LQ Newbie
 
Registered: Feb 2008
Distribution: RHEL
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by alan_ri View Post
I think that you are trying to do something that can't be done.What you want to customize is just a line in a kernel or init,and the only thing that you can customize there is; will kernel load the policy or not.What you want to customize is nothing else then your policy.
Can you provide URI for this that kernel or init only have option that they can load policy or not?

What I want to do is to customise the file which loads policy or init script such that we have a choice such that which policy file to load? It's some generic kind of thing. If you can suggest any other way the same can be achived then it will very much appreciated. Thanks.
 
Old 03-06-2008, 12:08 PM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Why would you *want* to choose which policy to load?
I think it's time you elaborate on what you *really* want to do.
 
  


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
editing of policy and configuration file anil2003 Linux - Security 1 04-25-2006 12:53 PM
editing of configuration and policy file and implementing tripwire anil2003 Linux - Security 1 04-24-2006 02:52 PM
editing of configuration and policy file while implementing tripwire-2.3.1-2-i686.tgz anil2003 VectorLinux 0 03-29-2006 04:36 AM
Any information on the configuration policy of Fedora? the_rhino Fedora 0 10-29-2004 12:46 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM

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

All times are GMT -5. The time now is 05:31 AM.

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