LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-14-2010, 09:17 PM   #1
bt101
Member
 
Registered: Mar 2008
Posts: 61

Rep: Reputation: 19
suid/setuid kill question


Hi

I am using the dialing commands pon/poff to start pppd.
pppd has the stick bit set so that it runs as root.

I have 2 non-superusers that can successfully start pppd using the pon command, and I can see that pppd indeed is running as root.

What I don't understand is that the user that started pon is able to successfully call poff and kill pppd, however the other user cannot kill pppd.

I would think that since pppd is running as root, neither should be able to kill it. How does pppd have any memory of who called it if it is now running as root?

Thanks
 
Old 01-15-2010, 09:57 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I'm not 100% sure how it works, but I do know that Linux processes actually have two user IDs, the real userID (belonging to the person who started the process) and the effective user ID (i.e. 0 if the setuid bit is set and the executable is owned by root). My guess is that the kill system call checks both the real and effective user ID (and reading the kill(2) man page confirms this impression). Processes also have real and effective group IDs as well.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A question about setuid trist007 Linux - Newbie 2 12-14-2008 02:23 PM
A question about setuid trist007 Linux - Newbie 1 12-14-2008 01:48 PM
A question about setuid trist007 Linux - Newbie 1 12-14-2008 01:48 PM
SUID question ddaas Linux - General 3 02-08-2007 05:28 AM
SUID file drops suid bit on append? c_coder Programming 1 03-12-2004 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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