LinuxQuestions.org
Help answer threads with 0 replies.
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 08-21-2013, 11:27 AM   #1
dcarrington
Member
 
Registered: Dec 2011
Distribution: RHEL, CentOS, Ubuntu
Posts: 61

Rep: Reputation: 2
SELinux: Security Level (s0) shows on some servers and not others


We have a number of different servers all running the same version of RHEL, on the same kernel, all up to date on patches, etc. They have the same SELinux policies applied and the same /etc/selinux/config files.

Yet, on some systems, when I do an ls -lZ on, for example, /etc/httpd/conf the SELinux contexts will show as system_u:object_r:httpd_config_t but on other systems the exact same thing will show system_u:object_r:httpd_config_t:s0.

Why does the 's0' show on some servers and not others? Is there an SELinux setting that I'm missing that controls this? I've looked through the file_contexts and on all servers, it shows that /etc/httpd(/.*)? includes the s0.

Thanks for any tips on this.

Last edited by unSpawn; 08-21-2013 at 04:02 PM. Reason: //Added vBB noparse tags
 
Old 08-21-2013, 04:05 PM   #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 dcarrington View Post
Why does the 's0' show on some servers and not others?
No idea.


Quote:
Originally Posted by dcarrington View Post
Is there an SELinux setting that I'm missing that controls this?
"s0" is a level. The default policy is targeted. You don't need to control this unless you're running a MLS (Multi-Level Security) policy.
 
Old 08-21-2013, 04:35 PM   #3
dcarrington
Member
 
Registered: Dec 2011
Distribution: RHEL, CentOS, Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 2
unSpawn,

I agree. All of our SELinux policies are "targeted." I even tried checking to see if one system was Enforcing and another Permissive just in case that would make a difference. I figured there didn't seem to be any other variable I could look at. But they were both Enforcing.

Thanks for the reply, though.
 
Old 08-21-2013, 05:21 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
The level remains the same regardless of what state SELinux is in. There's no variables to look at as the level doesn't matter if you're using a "targeted", and not a MLS, policy.
 
Old 08-21-2013, 05:24 PM   #5
Linux MR
Member
 
Registered: May 2013
Location: Pacific North West
Distribution: Red Hat, Scientific, Fedora, openSuSE, Mageia, Mint, Arch
Posts: 57

Rep: Reputation: Disabled
You should check the file below to see how the translations are mapped out.
Quote:
/etc/selinux/targeted/setrans.conf
Though unSpawn is correct, it's more for MLS stuff.

anywho...just for kicks mine shows
Quote:
s0=SystemLow
s0-s0:c0.c1023=SystemLow-SystemHigh
s0:c0.c1023=SystemHigh
Hope that helps...
 
1 members found this post helpful.
Old 08-21-2013, 06:01 PM   #6
dcarrington
Member
 
Registered: Dec 2011
Distribution: RHEL, CentOS, Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 2
Yeah, I don't get why they're displayed differently on different servers. I did check that file, @Linux MR. The file on both systems is identical. I'm at a loss.
 
Old 08-22-2013, 01:58 PM   #7
dcarrington
Member
 
Registered: Dec 2011
Distribution: RHEL, CentOS, Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 2
Eureka!!

As it turns out, the common thread here is the mcstransd service. With the service running, it does NOT display the Security Level and with the service stopped, the Service Level is displayed when you use the -Z to list files or processes, etc.

The article that talks about this can be found at:

http://www.redhatmagazine.com/2007/0...linux-daemons/

It's about halfway down the page.
 
1 members found this post helpful.
  


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
RAID level for servers. mitchnelson Linux - Enterprise 2 09-01-2010 04:52 AM
LXer: Buck-security - Security scanner for Ubuntu Servers LXer Syndicated Linux News 0 03-31-2010 08:10 PM
SELinux Security Level Configuration modernsaint Linux - Security 2 12-10-2007 01:21 AM

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

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