View Single Post

  #5 (permalink)  
Old 04-17-2008
Ertugrul Söylemez
 
Posts: n/a
Default Re: Why 'mount' utils nees a setuid bit?

Sylvain Robitaille <syl@alcor.concordia.ca> wrote:

> >> As we all known , in most case , 'mount ' can only be used by root
> >> .

> >
> > Wrong.

>
> 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). 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.


Regards,
Ertugrul.


--
http://ertes.de/

Reply With Quote