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
- 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
* Proxy can be configured in a config-file or be taken
from an environment variable or given as an option
* 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
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