[Samba] question about smbmount as user

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Thu Oct 30 13:22:15 GMT 2008


Hi,

Wrong question, wrong place, or is it just uninteresting perhaps?



----- Original Message ----- 
From: "Alex van den Bogaerdt" <alex at vandenbogaerdt.nl>
To: <samba at lists.samba.org>
Sent: Thursday, October 23, 2008 3:36 PM
Subject: [Samba] question about smbmount as user


> Hi,
>
> It has been a while since I used samba so for all purposes I could be seen 
> as a newbie.
>
> Recently I installed samba and ran into a problem mounting shares as a 
> user. I can work around this, no problem, but I'm curious about the *why*. 
> Searching the mailing list (and other resources) did not reveal this 
> problem, that's why I ask here.
>
> Samba version 3.2.4
> mount.cifs version 1.11-3.2.4
>
>
> When mounting a share as a normal user, the mountpoint has to be owned by 
> the user and needs to have at least u=rwx.
>
> This means I can no longer set the mountpoint like so:
> d---------  2 root root  4096 Oct 23 14:58 someshare
>
> After modifying line 1255 of mount.cifs.c >>> if((statbuf.st_uid == 
> getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) { <<< into >>> 
> if(1) { <<<, I get what I think I want. A user can mount that share and 
> the directory mode allows accessing the directory but only if mounted.
>
>
> That line is not put in just to show off. This means I'm probably 
> overlooking some security issue here. Can someone please enlighten me?
>
>
> By the way, if a developer reads this:  "mount.cifs -V" does not show the 
> version number. "mount.cifs x -V" does. Line 1051 prohibits this:  if 
> (argc
> > 2) {...} else {mount_cifs_usage();exit(1);}  Removing that else-block 
> > does
> not, at a first glance, seem to have unwanted effects.




More information about the samba mailing list