Age | Commit message (Collapse) | Author | Lines |
|
Since version 1.31.1, bindfs has implemented readdir by always
reading the entire directory and passing 0 offset to filler,
but this does not work if the same directory pointer is rewound
and reused.
We remove the opendir and closedir implementations (which FUSE permits)
and now always opendir() and closedir() in readdir. Alternatively we
could have added a rewinddir() to our readdir.
|
|
Fixes #40.
|
|
A regression was introduced in bindfs 1.13.1 with the fix
(or rather, workaround) for #28. FUSE's contract for readdir
says that if `filler` is passed a zero offset then the readdir
implementation should ignore the offset parameter, but we didn't.
Fixes #39.
|
|
This should address #36.
|
|
|
|
|
|
This should address #37.
|
|
|
|
|
|
|
|
|
|
1. use strtoul instead of user_uid and group_gid
2. change uid/gid in chown_new_file and bindfs_chown
|
|
uid_offset/gid_offset can translate host user uid/gid to new uid/
gid inside the mountpoint. New uid/gid = <src uid/gid> + offset
|
|
|
|
|
|
Fixes #15. Thanks @tyll!
|
|
_BSD_SOURCE has been deprecated in favor of _DEFAULT_SOURCE but
both can remain defined for backwards-compatibility.
|
|
|
|
|
|
|
|
I think ENOENT is fine.
This reverts commit 5922a236d0ce7fcf911fce6ff7a52b11ddcf2142.
|
|
|
|
|
|
bindfs_rmdir should never get called on a symlink unless
--resolve_symlinks is set (or a race condition changes the target into a
symlink). This means we can avoid the lstat if the flag is not set. This
may slightly enhance code readability too.
|
|
|
|
|
|
The unlink, rmdir, and rename system calls behave unexpectedly
if you resolve the symbolic link and perform the operation on that
instead. It would leave a dangling symlink and delete the original
instead which is probably not the intention.
This commit adds another parameter to process_path to enable or disable
the symlink resolution. The bindfs_unlink, bindfs_rmdir and
bindfs_rename functions use this parameter to produce the expected
result. rm -rf will still behave differently, deleting the contents of
the symlinked directory before removing the symlink and not the
linked directory.
|
|
This commit offers an alternative behaviour of not resolving broken
symbolic links in case returning ENOENT is undesirable behaviour.
|
|
There exist use cases where you would want bindfs to transparently
resolve symbolic links, such as when you are creating a chroot
environment with a bound fs. This change adds an option,
--resolve-symlinks, that modifies the behaviour of the process_path
and bindfs_symlink functions.
The process_path function is modified to return a mutable char* that
must be freed. When settings.resolve_symlinks is enabled the
process_path function calls realpath on the relative path to
transparently resolve the symbolic link.
A side effect of this change is that broken symbolic links will appear
in directory listings but any attempt to access the file of that name
will return the ENOENT error code. A subsequent commit offers an
alternative behaviour of not resolving broken symbolic links.
All callers of process_path are modified to check the return value of
process_path to make sure realpath and strdup were successful. They
also free the result after use to prevent memory leakage.
The bindfs_symlink function is modified to return EPERM when
resolve-symlinks is enabled. This must be done to prevent access to
arbitrary files on the filesystem.
|
|
As recommended by @retrography in #21.
|
|
|
|
|
|
Copied from
https://github.com/osxfuse/fuse/blob/master/example/fusexmp_fh.c
|
|
Fixes #12.
|
|
|
|
|
|
Use struct stat's st_mtim instead of st_mtime when available.
Fixes #16
|
|
|
|
|
|
|
|
|
|
|
|
Fixes utime'ing symlinks.
Seems to also fix an attribute caching problem.
|
|
|
|
|
|
|
|
|
|
|
|
fuse's pkg-config no longer includes it.
|
|
The previous names were deprecated as they
conflicted with standard mount options.
--owner was also deprecated for consistency.
The shorthands -u and -g were not deprecated.
This fixes issue 25.
|