LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 09-15-2010, 03:21 PM   #1
seepatplay
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
Using route command with a non root process


Hello,
Heres the scenario -
I use the system command route from a process (using the system() call). For security reasons the process does not have root privilege and for some reason I cannot use ioctl() either.
I tried to set the capabilities of the process to NET_ADMIN and SYS_ADMIN but the route command still failed due to insufficient permissions.

Question --
What are the capabilities that I need to set for route to be successful?

Thanks in advance
 
Old 09-15-2010, 09:52 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,095
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
All you need is NET_ADMIN. Where did you set the capabilities? If you tried to do them from within the process you probably didn't have sufficient privs to do so.

if you did the following as root:
setcap cap_net_admin=+eip /sbin/route

anyone that could run the route command could do routing changes. so a possibility is to make /sbin/route mode 0550 and a special routing group and have the process be run by a user in that routing group.
 
1 members found this post helpful.
  


Reply

Tags
route


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPC fails between user process and root process zaryab Linux - Newbie 1 09-22-2008 02:25 AM
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 05:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 05:34 AM
Need help with route command dalek Linux - Networking 5 07-15-2005 01:26 AM
'route' and root permissions CatSC Linux - Newbie 1 11-12-2003 05:51 AM


All times are GMT -5. The time now is 03:21 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration