LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-12-2007, 08:52 AM   #1
John W
LQ Newbie
 
Registered: Jun 2007
Location: Surrey, England
Distribution: RH ES v4
Posts: 2

Rep: Reputation: 0
how do I enable use of Capabilities in RH ES4.0?


Hi,
firstly appologies if this is the wrong section for this question.

I need to run a program that makes use of raw mode transfers across a network. This works fine as root, but the socket is blocked for other users.

I've discovered that I need to enable one of the capabilities called CAP_NET_RAW to do so as a user.
(this is why I've posted in this section as restricting capabilities seem security related...)

Man shows details of 'capabilities', as well as 'capget'.
When i call capget though, even as root, I get the following message:
Capget: operation not permitted.

I cannot find any details as to how to enable the capabilites.
I've googled for info, read all the sections of the manual that seem vaguely related to this, and can't find any clues.

No doubt this is a simple one, but I'm getting nowhere fast.

This is RH ES4.0 installed on a flash disk running on a cPCI card using a 32 bit Intel cpu.
Nothing special about the install, it runs just the same as the install on my desktop.

I look forward to your replies.

Cheers,
John.
 
Old 06-12-2007, 03:25 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
AFAIK POSIX capabilities like CAP_NET_RAW are and stay root's privilege (like using Spoon's lcap shows: all or nothing) and that's why traditionally them apps have been chmodded to be setuid root. If an application starts life with UID 0, then not dropping certain privs (a clear risk) can probably be accomplished programmatically, but for fine-grained *granting* of capabilities that aren't a users own "the new way" I think you'll need SELinux, GRSecurity or LIDS.
 
Old 06-13-2007, 01:46 AM   #3
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
I tried LIDS. You can achieve desired results in runtime environment.

Link :
http://www.lids.org/document/build_lids-0.2-4.html
File : /etc/lids/lids.cap
 
Old 06-13-2007, 10:56 AM   #4
John W
LQ Newbie
 
Registered: Jun 2007
Location: Surrey, England
Distribution: RH ES v4
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn
AFAIK POSIX capabilities like CAP_NET_RAW are and stay root's privilege (like using Spoon's lcap shows: all or nothing) and that's why traditionally them apps have been chmodded to be setuid root. If an application starts life with UID 0, then not dropping certain privs (a clear risk) can probably be accomplished programmatically, but for fine-grained *granting* of capabilities that aren't a users own "the new way" I think you'll need SELinux, GRSecurity or LIDS.
Thanks people, I didn't realise capabilities was not the preferred method.
I've gone the chmod setuid route for now, as it sorts the problem and gets things going.
I'll look into the other options if needs be. LIDS looks like it does what I want it to.

Many thanks for your quick responses. Now on to the next problem

Regards,
John.
 
  


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 to enable full multimedia capabilities on Suse 10.1 using the Xine engine reddazz SUSE / openSUSE 134 05-26-2012 05:25 PM
How to enable full multimedia capabilities on Suse 10.2 using the xine engine reddazz SUSE / openSUSE 8 12-11-2006 06:13 AM
How to enable full multimedia capabilities on Suse 10.2 using the Xine engine? joint SUSE / openSUSE 1 12-10-2006 09:21 AM
How to enable linux filesystem capabilities for kernel 2.24.18 toubo Linux - General 8 08-20-2004 10:09 AM

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

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