LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-18-2012, 12:57 AM   #1
kingkashif
Member
 
Registered: May 2009
Posts: 71

Rep: Reputation: 15
Change SELinux security context style


Hello,

I was wondering if anyone of you fellas could help me in finding out that how could i change the SELinux labeling i.e security context ?

for example the typical security context of a file "abc.txt" is

Code:
unconfined_u:object_r:user_home_t:s0
I want to change it to appear like

Code:
unconfined_u:object_r:user_home_t:MY-NAME-IS-HERE:s0
I shall be really thankful if anyone could direct me in this regard.

Thanks in Advance...
 
Old 02-18-2012, 01:45 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,610
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Quote:
Originally Posted by kingkashif View Post
I want to change it to appear like
Code:
unconfined_u:object_r:user_home_t:MY-NAME-IS-HERE:s0
Because you are not a newbie let's find out what you know about SELinux and how it applies a policy.
What would having "MY-NAME-IS-HERE" signify from a SELinux policy point of view?
 
Old 02-18-2012, 08:01 AM   #3
kingkashif
Member
 
Registered: May 2009
Posts: 71

Original Poster
Rep: Reputation: 15
Thanks unSpawn for your reply..

I know about SELinux and it's working quite well and how it applies it's policies etc.

The security label change that I want to have doesn't signify anything at the moment.

I have a vague idea for the future that I would like to implement..

But currently I just want to know if the SELinux security context that is placed on each file, could be changed the I way i have described.

I just want to add that extra value in the security context.

Any help in guiding towards that end would be highly appreciated..

Kind Regards
 
Old 02-18-2012, 08:45 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,610
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Quote:
Originally Posted by kingkashif View Post
I just want to add that extra value in the security context.
...then the simple answer is "no".
 
Old 02-18-2012, 10:10 AM   #5
kingkashif
Member
 
Registered: May 2009
Posts: 71

Original Poster
Rep: Reputation: 15
hmm!!
but isn't everything open source ? Someone has coded and designed the current security context..

So why can't it be changed ?
 
Old 02-18-2012, 11:25 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,610
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Quote:
Originally Posted by kingkashif View Post
So why can't it be changed?
It's not that. It definitely can be changed. But you want "something" but you don't have any clue what that "something" would be. And I don't think I'm well-versed enough in the Art of SELinux to start discussing "something" without having any clue what that "something" should be, do or would impact. Maybe start by buying a dead tree book like the "Light Saber" book aka SELinux By Example?..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change file security context produce errors johnhunsley Linux - General 1 10-26-2011 07:23 PM
[SOLVED] SElinux context for FTP smilemukul Linux - Newbie 3 09-23-2010 05:35 PM
SElinux context problem Bit-Devil Linux - Security 0 12-06-2009 03:44 AM
SELinux: How can I clear the context when I copy a file? walkinmud Linux - Enterprise 3 08-09-2005 11:23 PM
invalid context in SELinux lothario Linux - Security 1 06-17-2005 04:03 PM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration