#14 Enhenced user mount and unmount



I was not happy with the way mounting by normal users
worked, so I did some changes which I think of as
* Mounting and unmountig by normal users works now like
with other filesystems. Especially there is no more
error message when trying to unmount (difference
between fstab and mtab) and unmounting will also shut
down the mount.davfs-daemon.
* As user mount needs mount.davfs to be set uid I tried
to minimize the risks:
- mount.davfs changes the euid to uid at the beginning
and only changes back to root permissions when necessary.
- when forking into daemon mode the euid is changed to
uid permanantly to make it impossible to gain root
permissions again.
- There is no more need to call davfs directly, it is
invoked by mount. But as we can't prevent users from
calling it directly, in case of a normal user fstab is
checked in any case. Normal users are not allowed to
choose options different from fstab.
* Creditentials are now stored in secrets files that
are read/writable by the owner only. If none is found
they are asked interactively - for server and for proxy
seperately. The options for username and password are
removed, so they will no more appear on comand line or
in fstab.
* Proxy can be configured in a config-file or be taken
from an environment variable or given as an option
(like now).
* Nautilus did not allow to create files on a davfs
because it could not get the amount of free disk space
and therefore asumed 0. So I inserted code in "case
CADA_STATFS" to fake free disk space. This is not a
clean solution, but it works and I don't know a better
* After checking the connection to the WebDAV-server I
don't close the connection again but hold it open and
create the root VFid. So mounting will be a little bit
* Options in the command line may be before or after
the arguments.
To do this changes, and becouse I needed some training
in C-coding I changed quite a lot, more than necessary.
But I still think it is an enhancement.
I could only test the changes on my Debian/Testing
system on i386-hardware. So I would be very fond, if
other people could test it and give me response.
To apply the patch you may change into the
davfs2-0.2.3-directory and type :
patch -p1 < path-to-davfs2-usermaount.diff



  • Werner Baumann

    Werner Baumann - 2005-04-15

    Logged In: YES

    I can't upload the patch, instead get the following error
    "File Upload: ArtifactFile: Could not open file for writing"
    I don't undersstand the need for "open file for writing".
    Does somebody know whats going wrang?

  • SungHun Kim

    SungHun Kim - 2005-04-21

    Logged In: YES

    It seems very good enhancement. I patched the CVS trunk and
    committed it. Good work Werner!


  • SungHun Kim

    SungHun Kim - 2005-04-21
    • status: open --> closed
  • SungHun Kim

    SungHun Kim - 2005-04-23

    Logged In: YES

    This patch has been committed to the CVS.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks