Bug 5996 - mount.cifs should support -f
mount.cifs should support -f
Status: RESOLVED FIXED
Product: CifsVFS
Classification: Unclassified
Component: user space tools
2.6
Other Linux
: P3 enhancement
: ---
Assigned To: Steve French
http://bugs.debian.org/498704
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-25 12:59 UTC by Debian samba package maintainers (PUBLIC MAILING LIST)
Modified: 2009-03-01 07:24 UTC (History)
1 user (show)

See Also:


Attachments
add -f (fake mount option) to mount.cifs utility (733 bytes, patch)
2009-02-02 12:26 UTC, Shirish S. Pargaonkar
no flags Details
add flag -f handling as well as -n flag handling in mount.cifs (1.13 KB, patch)
2009-02-07 08:34 UTC, Shirish S. Pargaonkar
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debian samba package maintainers (PUBLIC MAILING LIST) 2008-12-25 12:59:26 UTC
As reported by one of our users in Debian (see the above mentioned URL), it would be good if mount.cifs supported the "fake" mount option which is common to many mount utilities. It is for instance used in Debian and Ubuntu by the /etc/init.d/mtab.sh script that updates /etc/mtab with entries for filesystems that were mounted before that file was writable.
Comment 1 Shirish S. Pargaonkar 2009-02-02 12:26:49 UTC
Created attachment 3907 [details]
add -f (fake mount option) to mount.cifs utility

Added -f option to mount.cifs.c. 
Is this kind of functionality is what intended?
Comment 2 Debian samba package maintainers (PUBLIC MAILING LIST) 2009-02-03 01:30:13 UTC
Well, I'm not clever enough to actually read the whole code and understand what it exactly does.


What's (imho) needed for a "fake mount" option is that it actually does "as if" it would mount the resources....without really mounting it.

So, mount should fail in case something wrong happens (non-existing resource, not enough rights and all other failure cases) AND exit with zero return code but *without* mounting the resource in case the mount would succeed.

hope this is clearer.;:-)

PS: please note that the new option should also be documented in the manpage...

--
Christian Perrier <bubulle@debian.org> on behalf of Debian maintainers
Comment 3 Shirish S. Pargaonkar 2009-02-03 17:25:45 UTC
(In reply to comment #2)

This is what -f option does

-f 
Fake mount. Go through the motions of checking the device and directory, but do not actually mount the filesystem

That is what this fix does. 
Comment 4 Debian samba package maintainers (PUBLIC MAILING LIST) 2009-02-04 04:06:13 UTC
(In reply to comment #3)

Seems fine by me and exactly what we would need. I haven't checked the patch but I believe it's OK to commit it...
Comment 5 Shirish S. Pargaonkar 2009-02-07 08:34:00 UTC
Created attachment 3927 [details]
add flag -f handling as well as -n flag handling in mount.cifs

This patch is commited in samba (source3) git tree.
Comment 6 Debian samba package maintainers (PUBLIC MAILING LIST) 2009-03-01 07:24:07 UTC
As 3.3.1 fixes this bug, I think it should be marked as such

--
Christian Perrier