Giuseppe Scrivano
b3898da66d
overlay: honor trusted.overlay.origin
...
While fuse-overlayfs doesn't set this xattr, ensure that we honor it
when it exists so that we report the correct st_ino on lower layers
that were created using the kernel implementation.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-08-01 13:54:08 +02:00
Giuseppe Scrivano
78f00d6449
setxattr: do not allow to set trusted.overlay.
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-08-01 13:51:18 +02:00
Giuseppe Scrivano
21cb0e199d
read_dirs: always initialize l->next to NULL
...
Resolve a segfault when using multiple lower layers.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-08-01 13:51:18 +02:00
Giuseppe Scrivano
1dadd3738f
main: improve errors logging
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-08-01 10:29:24 +02:00
Vincent Batts
1ed274ba57
Dockerfile: foreground and allow args to fuse-overlayfs
2018-07-31 19:51:15 +02:00
Vincent Batts
d73490709b
*: some build hints and static link example
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2018-07-31 18:55:46 +02:00
Giuseppe Scrivano
79c70fd91a
COPYING: add file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-30 15:13:57 +02:00
Daniel J Walsh
13575b6335
Merge pull request #5 from giuseppe/build-cleanup
...
build: a couple of cleanups
2018-07-25 17:03:55 -04:00
Giuseppe Scrivano
b81b387d02
build: let configure fail if libfuse is not found
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-25 22:06:00 +02:00
Giuseppe Scrivano
e0017c2a31
build: drop unused GNU files
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-25 22:05:32 +02:00
Giuseppe Scrivano
71a8ad3175
fuse-overlayfs: try RENAME_EXCHANGE if the destination is a whiteout
...
if we are trying to move over an existing whiteout, try a rename2(...,
RENAME_EXCHANGE) first, so in one atomic operation we get both the
file renamed and the whiteout created in the old source.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-23 22:11:56 +02:00
Daniel J Walsh
30a9800696
Merge pull request #3 from giuseppe/add-travis
...
travis: add tests
2018-07-21 07:26:01 -04:00
Giuseppe Scrivano
16754859c2
.travis.yml: new file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-21 12:45:14 +02:00
Giuseppe Scrivano
70e9f2c0af
build: fix libraries order
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 13:40:50 +02:00
Giuseppe Scrivano
3c0e4fac10
main: define RENAME_WHITEOUT if the definition is missing
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 13:40:50 +02:00
Giuseppe Scrivano
a5431eda02
main: remove include for unused file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 13:40:50 +02:00
Giuseppe Scrivano
552afbf2db
fuse-overlayfs: mountpoint is the last argument passed
...
Consider the mountpoint to be the last argument passed, so that
fuse-overlayfs can be used as a mount helper.
This enables to run the github.com/amir73il/unionmount-testsuite
testsuite on fuse-overlayfs.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 12:36:12 +02:00
Giuseppe Scrivano
24dd39ee72
fuse-overlayfs: fix order of lower layers
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-19 09:23:21 +02:00
Giuseppe Scrivano
5b29022bd3
fuse-overlayfs: honor opaque directories
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 21:59:09 +02:00
Giuseppe Scrivano
d55cd97b73
fuse-overlayfs: propagate errors from readdir(3)
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 19:30:49 +02:00
Giuseppe Scrivano
cc18f5ce18
fuse-overlayfs: rename uses a .wh. style whiteout
...
during a rename, use a .wh. style whiteout for the destination, so
that if the rename fails we don't make visible files from the lower
layers.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 16:30:04 +02:00
Giuseppe Scrivano
e908a68156
fuse-overlayfs: remove duplicate variable in ovl_rename_direct
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 14:43:21 +02:00
Giuseppe Scrivano
b3f454183f
fuse-overlayfs: split ovl_rename in two functions
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 14:30:26 +02:00
Giuseppe Scrivano
234a1baaf9
rpm: drop multiple listed dependencies
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 15:17:24 +02:00
Giuseppe Scrivano
04be2fced2
fuse-overlayfs: error out if redirect_dir is specified
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 14:15:03 +02:00
Giuseppe Scrivano
8b54d466e1
fuse-overlayfs: name the xattr origin not redirect
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 12:54:09 +02:00
Giuseppe Scrivano
358873e18b
fuse-overlayfs: do not allow to overwrite user.fuseoverlayfs xattrs
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 12:42:49 +02:00
Giuseppe Scrivano
6e7b5d70fd
fuse-overlayfs: reload the dir before checking for EXDEV
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
e0ba188721
fuse-overlayfs: fix xattrs
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
85d1a08cf2
fuse-overlayfs: support also mv to empty directory with whiteouts
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
0cc1b77696
fuse-overlayfs: hide directories recursively on a rename
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
b054b9a191
fuse-overlayfs: allow copy of a dir over an existing in the lower layers
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
86f98b4c91
fuse-overlays: do not uncover removed directories from lower dirs
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
f58a9c452e
fuse-overlayfs: skip whiteouts when comparing hardlinks during a rename
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
382b0d8e0c
fuse-overlayfs: create hard link in the workdir first
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
c851b9bfda
fuse-overlayfs: stop lookup on the first file found
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
81ecc7ea77
fuse-overlayfs: check if it is a whiteout before raising EEXIST
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
9c5acf4bf2
fuse-overlayfs: attempt to delete node whiteout first
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
4d34e45e37
fuse-overlayfs: implement mknod
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
b8f90ec1f6
fuse-overlayfs: mkdir creates the directory in the workdir first
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
996f297f9d
rmdir: catch ENOTEMPTY also when deleting a dir from a lower layer
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
616119093a
fuse-overlayfs: use renameat2(RENAME_WHITEOUT) when possible
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
81c939f350
fuse-overlayfs: attempt to create mknod whiteout before attempting the .wh. fallback
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 16:57:59 +02:00
Giuseppe Scrivano
0d02ef15ce
fuse-overlayfs: check if it is a whiteout also when doing a lookup
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 16:20:51 +02:00
Giuseppe Scrivano
dbf5732c75
fuse-overlayfs: refactor code to delete a whiteout
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 12:37:48 +02:00
Giuseppe Scrivano
4dd791a734
fuse-overlayfs: refactor code to create a whiteout
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 11:10:29 +02:00
Giuseppe Scrivano
d8e9ee1299
fuse-overlayfs: shift uid/gid from FUSE ctx
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 10:27:58 +02:00
Giuseppe Scrivano
3c4027da81
open: create the new file in the working directory first
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 10:12:01 +02:00
Giuseppe Scrivano
f16008d3a9
build: add missing files
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-10 17:06:23 +02:00
Giuseppe Scrivano
e030b7b8fd
lib: update
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-10 17:06:23 +02:00