Bug 4780 - mount.cifs: user mount should imply uid=,gid= by default
mount.cifs: user mount should imply uid=,gid= by default
Status: RESOLVED FIXED
Product: CifsVFS
Classification: Unclassified
Component: user space tools
2.6
All Linux
: P3 minor
: ---
Assigned To: Steve French
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-12 01:08 UTC by Steve Langasek
Modified: 2007-12-13 19:19 UTC (History)
2 users (show)

See Also:


Attachments
Patch for sensible uid= default for mount.cifs (2.47 KB, patch)
2007-07-12 01:12 UTC, Steve Langasek
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Langasek 2007-07-12 01:08:47 UTC
By default, when mount.cifs is invoked as a non-root user for mounting a share from a non-Samba server, no uid= or gid= option is passed to the kernel, with the result that files are only writable by root on the mount point.  The sensible default would be for user mounts to inherit uid= and gid= from the calling user when called as non-root, except when overridden on the commandline.

Patch to follow.
Comment 1 Steve Langasek 2007-07-12 01:12:47 UTC
Created attachment 2811 [details]
Patch for sensible uid= default for mount.cifs

This patch ensures that default uid and gid values are passed to the kernel when mount.cifs is invoked by !root.
Comment 2 Steve French 2007-07-20 16:12:25 UTC
your logic makes sense - am looking at patch
Comment 3 Jeremy Allison 2007-12-12 20:52:58 UTC
I don't like the strcpy calls in this patch. Look unsafe to me...
Jeremy.
Comment 4 Jeremy Allison 2007-12-13 19:19:43 UTC
Fixed using a varient of this patch for 3.0.28a and above.
Jeremy.