mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-14 09:46:33 -04:00
main: if the path is a dir, work on the proc path
when reading xattr, if the path cannot be open as it is a directory, operate on the /proc/fd/FD path. Closes: https://github.com/containers/fuse-overlayfs/issues/104 Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
This commit is contained in:
parent
c756bbe9e7
commit
08136d8826
2
main.c
2
main.c
@ -554,7 +554,7 @@ open_fd_or_get_path (struct ovl_data *lo, struct ovl_node *n, char *path, int *f
|
||||
path[0] = '\0';
|
||||
|
||||
*fd = TEMP_FAILURE_RETRY (openat (node_dirfd (n), n->path, O_NONBLOCK|O_NOFOLLOW|mode));
|
||||
if (*fd < 0 && errno == ELOOP)
|
||||
if (*fd < 0 && (errno == ELOOP || errno == EISDIR))
|
||||
{
|
||||
get_node_path (lo, n, path);
|
||||
return 0;
|
||||
|
@ -45,5 +45,11 @@ fuse-overlayfs -o fast_ino_check=1,sync=0,lowerdir=lower,upperdir=upper,workdir=
|
||||
|
||||
docker run --rm -ti -v $(pwd)/merged:/merged centos:6 yum --installroot /merged -y --releasever 6 install nano
|
||||
|
||||
mkdir merged/a-directory
|
||||
|
||||
setfattr -n user.foo -v bar merged/a-directory
|
||||
getfattr -d merged/a-directory | grep bar
|
||||
getfattr --only-values -n user.foo merged/a-directory | grep bar
|
||||
getfattr --only-values -n user.foo upper/a-directory | grep bar
|
||||
|
||||
umount merged
|
||||
|
Loading…
x
Reference in New Issue
Block a user