what is the difference between smbmount and smbmnt?

Andrew Bartlett abartlet at samba.org
Wed Nov 17 09:03:26 GMT 2004


On Wed, 2004-11-17 at 11:12, David Wuertele wrote:
> It looks like mounting on the client works this way:
> 
>   1.  user invokes smbmount
>   2.  smbmount forks
>       2.a.  parent pauses until it gets killed, which is when child
>             discovers that mounting operation did its job
>       2.b.  child forks
>             2.b.a.  new parent waits around forever for signals from
>                     the kernel
>             2.b.b.  new child execs smbmnt
>   3.  smbmnt calls the mount(2) syscall
>   4.  smbmnt exits
> 
> Question: Why are smbmount and smbmnt two separate programs?  Couldn't
> all of these tasks been handled more efficiently without the extra
> exec()?

smbmnt is sometimes suid, to allow user mounts.  Making smbmount suid
would be a root exploit, which is why we have a check in the early code
that dies if this appears to be the case.  (LIBSMB_PROG would allow
arbitrary code execution).

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at samba.org
Authentication Developer, Samba Team            http://samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20041117/f793c7a7/attachment.bin


More information about the samba-technical mailing list