View Single Post

  #7 (permalink)  
Old 04-17-2008
Sylvain Robitaille
 
Posts: n/a
Default Re: Why 'mount' utils nees a setuid bit?

Ertugrul Söylemez wrote:

>> Actually, the mount(2) manual page confirms the OP's statement: (from
>> mount(2) on a Linux system; other systems may vary)
>>
>> Only the super-user may mount and unmount filesystems.

>
> Pay closer attention. You're confusing the syscall mount(2) with the
> command line utility mount(8).


I'm not. I made a point of clarifying that I was referring to the
system call's manual page. How do you suppose that mount(8)
accomplishes the task of actually mounting a filesystem? It calls
mount(2), which requires euid==0.

> For the syscall, the statement is true, because it can only be used by
> processes with effective user-id 0 (i.e. root), or with proper
> capabilities. This is, what the SetUID bit is good for.


My point exactly, and the answer to the OP's question.

--
----------------------------------------------------------------------
Sylvain Robitaille syl@alcor.concordia.ca

Network and Systems analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
Reply With Quote