798 Commits

Author SHA1 Message Date
Giuseppe Scrivano
17605e3633
test: fix storage tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-08-04 21:28:19 +02:00
Giuseppe Scrivano
151582b8ef
Merge pull request #314 from giuseppe/tag-1.7
NEWS: tag 1.7
2021-07-29 11:36:38 +02:00
Giuseppe Scrivano
512b364cd7
configure.ac: tag new dev release
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-29 11:12:09 +02:00
Giuseppe Scrivano
f38c0b849c
NEWS: tag 1.7
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
v1.7
2021-07-29 11:05:30 +02:00
Giuseppe Scrivano
cbb4594654
test: fix race when opening file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-29 11:05:29 +02:00
Daniel J Walsh
c25c60ed8d
Merge pull request #313 from giuseppe/fix-read-xattrs-devices
fuse-overlayfs: fix read xattrs for devices
2021-07-28 09:54:38 -04:00
Giuseppe Scrivano
79f885bc7b
tests: fix race condition
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-28 15:40:46 +02:00
Giuseppe Scrivano
4ad759b35a
fuse-overlayfs: fix read xattrs for devices
always use llistxattr and lgetxattr for listing and reading xattrs so
that the open/openat2 call doesn't fail when accessing a device.

Closes: https://github.com/containers/fuse-overlayfs/issues/312

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-28 13:03:55 +02:00
Giuseppe Scrivano
c45d315d19
Merge pull request #309 from sipsma/whiteout-in-opaque
Don't create whiteout files in opaque dirs.
2021-07-08 16:17:29 +02:00
Giuseppe Scrivano
181973f531
Merge pull request #308 from natefoo/fix-unpriv-unlink
Fix operations on read-only files when running unprivileged.
2021-07-08 16:16:25 +02:00
Erik Sipsma
e5ce44256f Don't create whiteout files in opaque dirs.
If a dir is opaque, there's no need to create a whiteout within it as
the opacity will block out any files from lower dirs already anyways.

The kernel's overlay implementation also doesn't currently handle
whiteouts in opaque dirs very well (the whiteout shows up in readdir
calls but can't be stat'd), so this fix also improves compatibility
between fuse-overlay and the kernel's overlay a bit too.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-07-07 04:19:58 +00:00
Nate Coraor
6819869a8f Fix operations on read-only files when running unprivileged.
Fixes #307
2021-07-02 14:12:15 -04:00
Daniel J Walsh
58a016d03c
Merge pull request #305 from giuseppe/enable-posix-acls
main: enable POSIX ACLs
2021-06-23 16:05:30 -04:00
Giuseppe Scrivano
dd7e124dea
main: enable POSIX ACLs
Closes: https://github.com/containers/fuse-overlayfs/issues/304

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-23 21:51:37 +02:00
Daniel J Walsh
a12226c78d
Merge pull request #303 from giuseppe/fix-compiler-warnings
main: drop unused variables
2021-06-23 14:29:41 -04:00
Giuseppe Scrivano
3f9fc4e8d3
main: drop unused variables
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-23 11:45:58 +02:00
Daniel J Walsh
fadb29ae25
Merge pull request #300 from giuseppe/fix-invalid-access-listxattr
main: fix invalid access when filtering xattrs
2021-06-22 09:30:29 -04:00
Giuseppe Scrivano
853f83d0b2
configure.ac: prepare next release
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-21 22:45:49 +02:00
Giuseppe Scrivano
c0e6cca6c7
NEWS: tag 1.6
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
v1.6
2021-06-21 22:45:48 +02:00
Giuseppe Scrivano
12552f315f
main: check for parent->children before accessing it
this should not happen, but better be sure.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-21 22:45:47 +02:00
Giuseppe Scrivano
f41a872e0d
main: fix invalid access when filtering xattrs
Fix an invalid access when filtering internal xattrs.

The size passed to memmove was longer than the remaining bytes to
process.

As part of the fix: move the filtering logic to a separate function.

Closes: https://github.com/containers/fuse-overlayfs/issues/293

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-21 22:45:46 +02:00
Giuseppe Scrivano
0087bbc85f
.github: fix tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-21 21:27:08 +02:00
Giuseppe Scrivano
91a020f8ae
Merge pull request #297 from gqgs/patch-1
man: remove duplicated description of workdir option
2021-06-01 21:11:05 +02:00
Guilherme
148a3b5986 man: remove duplicated description of workdir option 2021-06-01 00:28:21 -03:00
Daniel J Walsh
f3e297d48f
Merge pull request #295 from giuseppe/tag-dev
configure.ac: tag -dev version
2021-05-01 06:22:09 -04:00
Giuseppe Scrivano
ee1c37c590
configure.ac: tag -dev version
Closes: https://github.com/containers/fuse-overlayfs/issues/294

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-29 09:00:02 +02:00
Daniel J Walsh
29c8c6f9ce
Merge pull request #292 from giuseppe/fix-mem-leak-on-errors
main: fix some issues reported by static analysis
2021-04-19 10:17:26 -04:00
Giuseppe Scrivano
a8d7c0b0f4
main: avoid temporary copy
use directly node->path instead of copying it to a temporary buffer.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-19 09:32:39 +02:00
Giuseppe Scrivano
8241648406
main: fix a memory leak on errors
It was reported by static analysis.  The resource is not really leaked
since fuse-overlayfs exits immediately when load_default_plugins()
fails.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-19 09:25:48 +02:00
Daniel J Walsh
b2a8df7ea8
Merge pull request #290 from giuseppe/fix-fd-leak
main, rename: fix leak on error
2021-04-17 06:09:11 -04:00
Daniel J Walsh
fc0eae542e
Merge pull request #291 from giuseppe/fix-dir-reload
main: move directory load at readdir time
2021-04-17 06:07:00 -04:00
Giuseppe Scrivano
0db6ecbbd9
main: move directory load at readdir time
move the logic for loading the directory content at readdir time when
the offset is set to 0, so that any new file to the directory is
propagated.

Closes: https://github.com/containers/fuse-overlayfs/issues/287

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-16 21:53:37 +02:00
Giuseppe Scrivano
d4188a4f59
main, rename: fix leak on error
fix a fd leak on the error exit path.

Closes: https://github.com/containers/fuse-overlayfs/issues/289

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-16 20:36:35 +02:00
Giuseppe Scrivano
af5cb1c04c
Merge pull request #288 from cptpcrd/utimensat-fix
Fix flaws in utimensat() handling
2021-04-16 20:35:57 +02:00
cptpcrd
defd480c0e main: improve UTIME_NOW special-casing
FUSE never passes FUSE_SET_ATTR_ATIME_NOW without also passing
FUSE_SET_ATTR_ATIME. Since FUSE_SET_ATTR_ATIME_NOW was only checked if
FUSE_SET_ATTR_ATIME was not set, it would never be triggered.

Note that this is an *improvement*, not a *fix*, because FUSE always
passes the current time in st_atim whenever it sets
FUSE_SET_ATTR_ATIME_NOW. As a result, the previous code works properly,
but it does so differently from the way it was intended to.

(All of the above descriptions of st_atim handling also applies to
st_mtim.)
2021-04-13 21:33:00 -04:00
cptpcrd
d23dbe914d main: tv_sec -> tv_nsec
As specified in utimensat(2), *tv_nsec*, not *tv_sec*, should be set to
UTIME_NOW or UTIME_OMIT.

The way this bug manifests is that if utimensat() is called with
one of the timestamps set to UTIME_OMIT, fuse-overlayfs will
accidentally reset the timestamp to 1073741822, which is 2004-01-10
13:37:02 UTC.
2021-04-13 21:32:57 -04:00
Giuseppe Scrivano
6457fd46c0
Merge pull request #285 from giuseppe/tag-1.5
NEWS: tag 1.5
2021-03-24 18:07:20 +01:00
Giuseppe Scrivano
e90bcb77f3
NEWS: tag 1.5
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
v1.5.0
2021-03-23 12:11:26 +01:00
Daniel J Walsh
30775315a6
Merge pull request #286 from giuseppe/fix-copyup-long-xattr
main: fix reading xattrs longer than 256 bytes
2021-03-23 06:46:21 -04:00
Giuseppe Scrivano
11ad142525
main: fix reading xattrs longer than 256 bytes
fix reading extended attributes longer than 256 bytes.

Closes: https://github.com/containers/fuse-overlayfs/issues/284

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-21 17:50:06 +01:00
Giuseppe Scrivano
f6b0d2eaea
Merge pull request #282 from dhedberg/master
main: Add option static_nlink to set st_nlink to 1 for all directories
2021-03-17 21:08:50 +01:00
David Hedberg
5ec356b29e main: Add option static_nlink to set st_nlink to 1 for all directories
Skips calculation of st_nlink for directories, which can be
expensive on higher latency file systems such as NFS.

Signed-off-by: David Hedberg <david.hedberg@gmail.com>
2021-03-16 18:51:42 +01:00
Daniel J Walsh
1f1377d880
Merge pull request #280 from giuseppe/rm-whiteout-symlink
main: mark directory not loaded on rename
2021-03-05 14:22:40 -05:00
Giuseppe Scrivano
d612d48326
main: mark directory not loaded on rename
if a whiteout was created as part of a rename operation, mark the
directory content as not loaded so to avoid some optimizations when a
whiteout file must be deleted.

Closes: https://github.com/containers/fuse-overlayfs/issues/279

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-05 17:51:18 +01:00
Giuseppe Scrivano
062ec18711
main: honor FUSE_OVERLAYFS_DISABLE_OVL_WHITEOUT also for renames
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-05 14:56:55 +01:00
Giuseppe Scrivano
0d77a9fdd0
main: simplify logic for FUSE_OVERLAYFS_DISABLE_OVL_WHITEOUT
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-05 14:56:35 +01:00
Daniel J Walsh
d085fa9ade
Merge pull request #278 from giuseppe/fix-static-analysis
src: fix some defects found by static analysis
2021-03-04 15:39:49 -05:00
Giuseppe Scrivano
5530c154d8
tests: fix test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-04 12:00:12 +01:00
Giuseppe Scrivano
95a0a8999b
tests: install ffjson
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-04 11:45:22 +01:00
Giuseppe Scrivano
44561349cd
main: use strncpy instead of strcpy
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-04 11:04:48 +01:00