Hello community,

here is the log from the commit of package fuse-overlayfs for openSUSE:Factory 
checked in at 2020-01-23 16:08:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fuse-overlayfs (Old)
 and      /work/SRC/openSUSE:Factory/.fuse-overlayfs.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fuse-overlayfs"

Thu Jan 23 16:08:48 2020 rev:6 rq:765715 version:0.7.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/fuse-overlayfs/fuse-overlayfs.changes    
2020-01-12 23:17:44.978668904 +0100
+++ /work/SRC/openSUSE:Factory/.fuse-overlayfs.new.26092/fuse-overlayfs.changes 
2020-01-23 16:10:04.091605765 +0100
@@ -1,0 +2,17 @@
+Mon Jan 20 08:46:43 UTC 2020 - Sascha Grunert <[email protected]>
+
+- Update to v0.7.5
+  - do not expose internal xattrs through listxattr and getxattr
+
+-------------------------------------------------------------------
+Fri Jan 17 10:38:18 UTC 2020 - Sascha Grunert <[email protected]>
+
+- Update to v0.7.4
+  - fix fallocate for deleted files.
+  - ignore O_DIRECT.  It causes issues with libfuse not using an
+    aligned buffer, causing write(2) to fail with EINVAL.
+  - on copyup, do not copy the opaque xattr.
+  - fix a wrong lookup for whiteout files, that could happen on a
+    double unlink.
+
+-------------------------------------------------------------------

Old:
----
  fuse-overlayfs-0.7.3.tar.xz

New:
----
  fuse-overlayfs-0.7.5.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fuse-overlayfs.spec ++++++
--- /var/tmp/diff_new_pack.emhvZS/_old  2020-01-23 16:10:05.459606576 +0100
+++ /var/tmp/diff_new_pack.emhvZS/_new  2020-01-23 16:10:05.459606576 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           fuse-overlayfs
-Version:        0.7.3
+Version:        0.7.5
 Release:        0
 Summary:        FUSE implementation for overlayfs
 License:        GPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.emhvZS/_old  2020-01-23 16:10:05.475606585 +0100
+++ /var/tmp/diff_new_pack.emhvZS/_new  2020-01-23 16:10:05.479606588 +0100
@@ -3,8 +3,8 @@
     <param name="url">https://github.com/containers/fuse-overlayfs.git</param>
     <param name="scm">git</param>
     <param name="filename">fuse-overlayfs</param>
-    <param name="versionformat">0.7.3</param>
-    <param name="revision">v0.7.3</param>
+    <param name="versionformat">0.7.5</param>
+    <param name="revision">v0.7.5</param>
   </service>
   <service name="set_version" mode="disabled">
     <param name="basename">fuse-overlayfs</param>

++++++ fuse-overlayfs-0.7.3.tar.xz -> fuse-overlayfs-0.7.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuse-overlayfs-0.7.3/NEWS 
new/fuse-overlayfs-0.7.5/NEWS
--- old/fuse-overlayfs-0.7.3/NEWS       2020-01-09 12:06:17.000000000 +0100
+++ new/fuse-overlayfs-0.7.5/NEWS       2020-01-17 22:02:54.000000000 +0100
@@ -1,3 +1,15 @@
+* fuse-overlayfs-0.7.5
+
+- do not expose internal xattrs through listxattr and getxattr.
+
+* fuse-overlayfs-0.7.4
+
+- fix fallocate for deleted files.
+- ignore O_DIRECT.  It causes issues with libfuse not using an aligned buffer, 
causing
+  write(2) to fail with EINVAL.
+- on copyup, do not copy the opaque xattr.
+- fix a wrong lookup for whiteout files, that could happen on a double unlink.
+
 * fuse-overlayfs-0.7.3
 
 - fix build with -fno-common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuse-overlayfs-0.7.3/configure.ac 
new/fuse-overlayfs-0.7.5/configure.ac
--- old/fuse-overlayfs-0.7.3/configure.ac       2020-01-09 12:06:17.000000000 
+0100
+++ new/fuse-overlayfs-0.7.5/configure.ac       2020-01-17 22:02:54.000000000 
+0100
@@ -1,5 +1,5 @@
 AC_PREREQ([2.69])
-AC_INIT([fuse-overlayfs], [0.7.3], [[email protected]])
+AC_INIT([fuse-overlayfs], [0.7.5], [[email protected]])
 AC_CONFIG_SRCDIR([main.c])
 AC_CONFIG_HEADERS([config.h])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuse-overlayfs-0.7.3/main.c 
new/fuse-overlayfs-0.7.5/main.c
--- old/fuse-overlayfs-0.7.3/main.c     2020-01-09 12:06:17.000000000 +0100
+++ new/fuse-overlayfs-0.7.5/main.c     2020-01-17 22:02:54.000000000 +0100
@@ -456,6 +456,13 @@
   return false;
 }
 
+static bool
+can_access_xattr (const char *name)
+{
+  return !has_prefix (name, XATTR_PREFIX)               \
+    && !has_prefix (name, PRIVILEGED_XATTR_PREFIX);
+}
+
 static int
 set_fd_opaque (int fd)
 {
@@ -826,6 +833,15 @@
       bool needs_whiteout;
 
       needs_whiteout = (node->last_layer != get_upper_layer (lo)) && 
(node->parent && node->parent->last_layer != get_upper_layer (lo));
+      if (!needs_whiteout && node_dirp (node))
+        {
+          ret = is_directory_opaque (get_upper_layer (lo), node->path);
+          if (ret < 0)
+            return ret;
+          if (ret)
+            needs_whiteout = true;
+        }
+
       if (needs_whiteout)
         {
           /* If the atomic rename+mknod failed, then fallback into doing it in 
two steps.  */
@@ -2190,6 +2206,7 @@
   struct ovl_node *node;
   struct ovl_data *lo = ovl_data (req);
   cleanup_free char *buf = NULL;
+  size_t i;
   int ret;
 
   if (UNLIKELY (ovl_debug (req)))
@@ -2234,6 +2251,21 @@
 
   len = ret;
 
+  for (i = 0; buf && i < len;)
+    {
+      size_t current_len;
+      const char *cur_attr = buf + i;
+
+      current_len = strlen (cur_attr) + 1;
+      if (can_access_xattr (cur_attr))
+        i += current_len;
+      else
+        {
+          memmove (buf + i, cur_attr + current_len, len - current_len);
+          len -= current_len;
+        }
+    }
+
   if (size == 0)
     fuse_reply_xattr (req, len);
   else if (len <= size)
@@ -2259,8 +2291,14 @@
       return;
     }
 
+  if (! can_access_xattr (name))
+    {
+      fuse_reply_err (req, ENODATA);
+      return;
+    }
+
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -2328,7 +2366,12 @@
       for (it = buf; it - buf < xattr_len; it += strlen (it) + 1)
         {
           cleanup_free char *v = NULL;
-          ssize_t s = safe_read_xattr (&v, sfd, it, 256);
+          ssize_t s;
+
+          if (! can_access_xattr (it))
+            continue;
+
+          s = safe_read_xattr (&v, sfd, it, 256);
           if (s < 0)
             return -1;
 
@@ -2355,7 +2398,7 @@
   char wd_tmp_file_name[32];
   bool need_rename;
 
-  need_rename = times || xattr_sfd >= 0 || uid != lo->uid || gid != lo->gid;
+  need_rename = set_opaque || times || xattr_sfd >= 0 || uid != lo->uid || gid 
!= lo->gid;
   if (!need_rename)
     {
       /* mkdir can be used directly without a temporary directory in the 
working directory.  */
@@ -2849,7 +2892,7 @@
   struct ovl_node key, *rm;
 
   node = do_lookup_file (lo, parent, name);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -2895,7 +2938,7 @@
     }
 
   pnode = do_lookup_file (lo, parent, NULL);
-  if (pnode == NULL)
+  if (pnode == NULL || pnode->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3000,7 +3043,7 @@
     }
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3060,7 +3103,7 @@
     fprintf (stderr, "ovl_removexattr(ino=%" PRIu64 "s, name=%s)\n", ino, 
name);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3149,6 +3192,8 @@
 
   flags |= O_NOFOLLOW;
 
+  flags &= ~O_DIRECT;
+
   if (lo->writeback)
     {
       if ((flags & O_ACCMODE) == O_WRONLY)
@@ -3287,7 +3332,7 @@
   if (UNLIKELY (ovl_debug (req)))
     fprintf (stderr, "ovl_read(ino=%" PRIu64 ", size=%zd, "
             "off=%lu)\n", ino, size, (unsigned long) offset);
-  buf.buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK;
+  buf.buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK | FUSE_BUF_FD_RETRY;
   buf.buf[0].fd = fi->fh;
   buf.buf[0].pos = offset;
   fuse_reply_data (req, &buf, 0);
@@ -3303,7 +3348,8 @@
   struct ovl_ino *inode;
   int saved_errno;
   struct fuse_bufvec out_buf = FUSE_BUFVEC_INIT (fuse_buf_size (in_buf));
-  out_buf.buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK;
+
+  out_buf.buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK | FUSE_BUF_FD_RETRY;
   out_buf.buf[0].fd = fi->fh;
   out_buf.buf[0].pos = off;
 
@@ -3436,7 +3482,7 @@
     fprintf (stderr, "ovl_getattr(ino=%" PRIu64 ")\n", ino);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3470,7 +3516,7 @@
     fprintf (stderr, "ovl_setattr(ino=%" PRIu64 "s, to_set=%d)\n", ino, 
to_set);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3652,7 +3698,7 @@
     fprintf (stderr, "ovl_link(ino=%" PRIu64 "s, newparent=%" PRIu64 "s, 
newname=%s)\n", ino, newparent, newname);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3666,7 +3712,7 @@
     }
 
   newparentnode = do_lookup_file (lo, newparent, NULL);
-  if (newparentnode == NULL)
+  if (newparentnode == NULL || newparentnode->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3791,7 +3837,7 @@
     fprintf (stderr, "ovl_symlink(link=%s, ino=%" PRIu64 "s, name=%s)\n", 
link, parent, name);
 
   pnode = do_lookup_file (lo, parent, NULL);
-  if (pnode == NULL)
+  if (pnode == NULL || pnode->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -3879,7 +3925,7 @@
   char *tmp;
 
   node = do_lookup_file (lo, parent, name);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -4240,7 +4286,7 @@
     fprintf (stderr, "ovl_readlink(ino=%" PRIu64 "s)\n", ino);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -4578,7 +4624,7 @@
   l = enter_big_lock ();
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -4657,7 +4703,7 @@
              ino, cmd, arg, fi, flags, in_buf, in_bufsz, out_bufsz);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -4719,6 +4765,7 @@
   struct ovl_data *lo = ovl_data (req);
   cleanup_close int fd = -1;
   struct ovl_node *node;
+  int dirfd;
   int ret;
 
   if (UNLIKELY (ovl_debug (req)))
@@ -4726,7 +4773,7 @@
              ino, mode, offset, length, fi);
 
   node = do_lookup_file (lo, ino, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
@@ -4739,7 +4786,8 @@
       return;
     }
 
-  fd = node->layer->ds->openat (node->layer, node->path, 
O_NONBLOCK|O_NOFOLLOW|O_WRONLY, 0755);
+  dirfd = node_dirfd (node);
+  fd = openat (dirfd, node->path, O_NONBLOCK|O_NOFOLLOW|O_WRONLY, 0755);
   if (fd < 0)
     {
       fuse_reply_err (req, errno);
@@ -4777,14 +4825,14 @@
              ino_in, off_in, fi_in, ino_out, off_out, fi_out, len, flags);
 
   node = do_lookup_file (lo, ino_in, NULL);
-  if (node == NULL)
+  if (node == NULL || node->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
     }
 
   dnode = do_lookup_file (lo, ino_out, NULL);
-  if (dnode == NULL)
+  if (dnode == NULL || dnode->whiteout)
     {
       fuse_reply_err (req, ENOENT);
       return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuse-overlayfs-0.7.3/utils.c 
new/fuse-overlayfs-0.7.5/utils.c
--- old/fuse-overlayfs-0.7.3/utils.c    2020-01-09 12:06:17.000000000 +0100
+++ new/fuse-overlayfs-0.7.5/utils.c    2020-01-17 22:02:54.000000000 +0100
@@ -23,6 +23,15 @@
 #include <string.h>
 #include <sys/sysmacros.h>
 
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+  (__extension__                                                              \
+    ({ long int __result;                                                     \
+       do __result = (long int) (expression);                                 \
+       while (__result == -1L && errno == EINTR);                             \
+       __result; }))
+#endif
+
 int
 file_exists_at (int dirfd, const char *pathname)
 {
@@ -120,7 +129,7 @@
 {
   int *pp = p;
   if (*pp >= 0)
-    close (*pp);
+    TEMP_FAILURE_RETRY (close (*pp));
 }
 
 void


Reply via email to