From 7251f20c4befce5fb79d3f31ba2b1d72a9561383 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sun, 25 Aug 2019 23:04:23 +0200 Subject: [PATCH 1/2] main: correctly read inode for unix sockets correctly read the inode when processing a UNIX socket. regression introduced by b25bbde64dc5d06373e087d7fae6367acf1fd09e. Closes: https://github.com/containers/fuse-overlayfs/issues/110 Signed-off-by: Giuseppe Scrivano --- main.c | 3 +-- tests/fedora-installs.sh | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 5647c29..d0a980a 100644 --- a/main.c +++ b/main.c @@ -1348,8 +1348,7 @@ make_ovl_node (struct ovl_data *lo, const char *path, struct ovl_layer *layer, c cleanup_close int fd = TEMP_FAILURE_RETRY (openat (it->fd, npath, O_RDONLY|O_NONBLOCK|O_NOFOLLOW)); if (fd < 0) { - /* It is a symlink, read only the ino. */ - if (errno == ELOOP && fstatat (it->fd, npath, &st, AT_SYMLINK_NOFOLLOW) == 0) + if (errno != EPERM && fstatat (it->fd, npath, &st, AT_SYMLINK_NOFOLLOW) == 0) { ret->tmp_ino = st.st_ino; mode = st.st_mode; diff --git a/tests/fedora-installs.sh b/tests/fedora-installs.sh index 4ddfcbc..f437645 100755 --- a/tests/fedora-installs.sh +++ b/tests/fedora-installs.sh @@ -47,6 +47,8 @@ docker run --rm -ti -v $(pwd)/merged:/merged centos:6 yum --installroot /merged mkdir merged/a-directory +python -c 'import socket; socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM).bind("merged/unix-socket")' + 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 From cc7218e7c9351a4b13f904f3b70d9f909d0e52cd Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sun, 25 Aug 2019 23:07:01 +0200 Subject: [PATCH 2/2] configure.ac: tag 0.6.1 Signed-off-by: Giuseppe Scrivano --- NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ad30164..4db65a5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +* fuse-overlayfs-0.6.1 + +- fix a regression introduced with 0.6 where UNIX sockets could not be correctly created. + * fuse-overlayfs-0.6 - fix an issue where changes to an inode would not be visible from another hard link. diff --git a/configure.ac b/configure.ac index 9681a76..b0d8c3e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([fuse-overlayfs], [0.6], [giuseppe@scrivano.org]) +AC_INIT([fuse-overlayfs], [0.6.1], [giuseppe@scrivano.org]) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_HEADERS([config.h])