LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-11-2010, 07:40 AM   #1
Toomas
LQ Newbie
 
Registered: Oct 2010
Location: Tallinn
Distribution: CentOS 5.5
Posts: 18

Rep: Reputation: 1
SELinux: how to list all Type Enforcement contexts that exist on the system?


A quote from RHCE exam prep book by A. Ghori:

Quote:
Allow only BIND daemon to be able to read named.conf by altering the SELinux file context to named_conf_t ...:
Code:
chcon -t named_conf_t named.conf
That all being well and good, what if I forget it is named_conf_t and find myself guessing, what on Earth this parameter should be? named_t? Or something else?

Is there some kind of shell prompt utility (similar to getsebool -a for SELinux booleans) to list al possible type enforcement parameters?

I'm just getting to grips with the whole idea of SELinux and chances are I might use the terminology inappropriately. Sorry, if that be the case.
 
Old 11-11-2010, 10:08 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
Quote:
Originally Posted by Toomas View Post
list all possible type enforcement parameters?
Try 'seinfo -t' to see all security contexts and 'matchpathcon /etc/named.conf' to query the default security context.
 
1 members found this post helpful.
Old 06-29-2011, 01:38 PM   #3
saifelyzal
LQ Newbie
 
Registered: Jun 2011
Distribution: Redhat
Posts: 28

Rep: Reputation: Disabled
you can try
#seinfo -t | grep named
 
Old 06-29-2011, 01:49 PM   #4
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 saifelyzal View Post
you can try
#seinfo -t | grep named
In the wrong-tool-for-the-right-job category yes you can but if you would have compared output of both you'd have seen 'seinfo -t|grep' returns 10 contexts without context. So unless you know SELinux intimately you might have chosen a seemingly OK context like say "named_t" instead of the required "named_conf_t"...
 
Old 06-30-2011, 12:10 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
Code:
semanage fcontext -l|grep named
?
 
  


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
Selinux-how do i find out what domains have permissions on what type?(selinux policy) vishyc88 Linux - Security 2 11-22-2010 04:27 AM
Exist a type of netinstall here ? ColDrake Slackware - Installation 4 11-06-2008 11:47 AM
NVIDIA and SELinux - can they co-exist?? KirkD Linux - Hardware 7 11-06-2007 01:20 PM
type declaration in SELinux silvercloud Linux - Enterprise 0 08-23-2005 03:47 AM
list<type> how can I make type be a pointer? exodist Programming 2 06-06-2005 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:00 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