update to 3.5.0

This commit is contained in:
Dave Dykstra 2019-05-24 10:47:09 -05:00
parent 7fcfe25ede
commit 0f626619b3
8 changed files with 47 additions and 156 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/fuse-3.4.2.tar.gz
/fuse-3.5.0.tar.gz

View File

@ -1,19 +0,0 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Mon, 9 Aug 2010 12:10:40 +0400
Subject: [PATCH] More parentheses
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/lib/fuse.c b/lib/fuse.c
index a40e995..479736c 100755
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -1759,7 +1759,7 @@ int fuse_fs_open(struct fuse_fs *fs, const char *path,
fprintf(stderr, "open flags: 0x%x %s\n", fi->flags,
path);
- err = fs->op.open(path, fi);
+ err = (fs->op.open)(path, fi);
if (fs->debug && !err)
fprintf(stderr, " open[%llu] flags: 0x%x %s\n",

View File

@ -0,0 +1,37 @@
From 3b2c90d3d1c5cd0ba09d1379d791f6ec7ac07c3d Mon Sep 17 00:00:00 2001
From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com>
Date: Fri, 24 May 2019 10:38:24 -0500
Subject: [PATCH] skip install parts that require root when non-root
---
util/install_helper.sh | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/util/install_helper.sh b/util/install_helper.sh
index 688b2450..061b16b0 100755
--- a/util/install_helper.sh
+++ b/util/install_helper.sh
@@ -22,16 +22,17 @@ else
DESTDIR="${DESTDIR%/}"
fi
-chown root:root "${DESTDIR}${bindir}/fusermount3"
-chmod u+s "${DESTDIR}${bindir}/fusermount3"
-
install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
"${DESTDIR}${sysconfdir}/fuse.conf"
+if [ `id -u` = 0 ]; then
+ chown root:root "${DESTDIR}${bindir}/fusermount3"
+ chmod u+s "${DESTDIR}${bindir}/fusermount3"
-if test ! -e "${DESTDIR}/dev/fuse"; then
- mkdir -p "${DESTDIR}/dev"
- mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
+ if test ! -e "${DESTDIR}/dev/fuse"; then
+ mkdir -p "${DESTDIR}/dev"
+ mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
+ fi
fi
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \

View File

@ -1,29 +0,0 @@
From: Tom Callaway <spot@fedoraproject.org>
Date: Mon, 25 Mar 2019 15:17:36 -0400
Subject: [PATCH] disable device creation during build/install
diff --git a/util/install_helper.sh b/util/install_helper.sh
index 688b245..8f40a9f 100755
--- a/util/install_helper.sh
+++ b/util/install_helper.sh
@@ -22,18 +22,12 @@ else
DESTDIR="${DESTDIR%/}"
fi
-chown root:root "${DESTDIR}${bindir}/fusermount3"
+# chown root:root "${DESTDIR}${bindir}/fusermount3"
chmod u+s "${DESTDIR}${bindir}/fusermount3"
install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
"${DESTDIR}${sysconfdir}/fuse.conf"
-
-if test ! -e "${DESTDIR}/dev/fuse"; then
- mkdir -p "${DESTDIR}/dev"
- mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
-fi
-
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
"${DESTDIR}${udevrulesdir}/99-fuse3.rules"

View File

@ -1,63 +0,0 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Wed, 3 Apr 2019 22:43:48 +0200
Subject: [PATCH] Whitelist smb2 (#392)
See also https://bugzilla.redhat.com/1694552#c7
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 74bd0be..f711b2f 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,3 +1,6 @@
+* Added SMB2 to whitelist (so users can now mount FUSE filesystems
+ on mountpoints within SMB 2.0 filesystems).
+
libfuse 3.4.2 (2019-03-09)
==========================
diff --git a/util/fusermount.c b/util/fusermount.c
index 7f9b7cd..5e0b104 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -1012,35 +1012,36 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
* but got expanded as we found more filesystems that needed to be
* overlayed. */
typeof(fs_buf.f_type) f_type_whitelist[] = {
- 0x5346414f /* OPENAFS_SUPER_MAGIC */,
0x61756673 /* AUFS_SUPER_MAGIC */,
0x00000187 /* AUTOFS_SUPER_MAGIC */,
0xCA451A4E /* BCACHEFS_STATFS_MAGIC */,
0x9123683E /* BTRFS_SUPER_MAGIC */,
0x00C36400 /* CEPH_SUPER_MAGIC */,
0xFF534D42 /* CIFS_MAGIC_NUMBER */,
- 0X00004D44 /* MSDOS_SUPER_MAGIC */,
0x0000F15F /* ECRYPTFS_SUPER_MAGIC */,
0x0000EF53 /* EXT[234]_SUPER_MAGIC */,
0xF2F52010 /* F2FS_SUPER_MAGIC */,
0x65735546 /* FUSE_SUPER_MAGIC */,
0x01161970 /* GFS2_MAGIC */,
0x47504653 /* GPFS_SUPER_MAGIC */,
- 0x3153464A /* JFS_SUPER_MAGIC */,
+ 0x0000482b /* HFSPLUS_SUPER_MAGIC */,
0x000072B6 /* JFFS2_SUPER_MAGIC */,
+ 0x3153464A /* JFS_SUPER_MAGIC */,
0x0BD00BD0 /* LL_SUPER_MAGIC */,
+ 0X00004D44 /* MSDOS_SUPER_MAGIC */,
0x0000564C /* NCP_SUPER_MAGIC */,
0x00006969 /* NFS_SUPER_MAGIC */,
0x00003434 /* NILFS_SUPER_MAGIC */,
0x5346544E /* NTFS_SB_MAGIC */,
+ 0x5346414f /* OPENAFS_SUPER_MAGIC */,
0x794C7630 /* OVERLAYFS_SUPER_MAGIC */,
0x52654973 /* REISERFS_SUPER_MAGIC */,
+ 0xFE534D42 /* SMB2_SUPER_MAGIC */,
0x73717368 /* SQUASHFS_MAGIC */,
0x01021994 /* TMPFS_MAGIC */,
0x24051905 /* UBIFS_SUPER_MAGIC */,
0x58465342 /* XFS_SB_MAGIC */,
0x2FC12FC1 /* ZFS_SUPER_MAGIC */,
- 0x0000482b /* HFSPLUS_SUPER_MAGIC */,
};
for (i = 0; i < sizeof(f_type_whitelist)/sizeof(f_type_whitelist[0]); i++) {
if (f_type_whitelist[i] == fs_buf.f_type)

View File

@ -1,30 +0,0 @@
diff --git a/util/mount.fuse.c b/util/mount.fuse.c
index d49e5b2..5c7a8c1 100644
--- a/util/mount.fuse.c
+++ b/util/mount.fuse.c
@@ -23,6 +23,25 @@
#include <sys/syscall.h>
#include <linux/capability.h>
#include <linux/securebits.h>
+/* for 2.6 kernels */
+#if !defined(SECBIT_KEEP_CAPS) && defined(SECURE_KEEP_CAPS)
+#define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS))
+#endif
+#if !defined(SECBIT_KEEP_CAPS_LOCKED) && defined(SECURE_KEEP_CAPS_LOCKED)
+#define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED))
+#endif
+#if !defined(SECBIT_NO_SETUID_FIXUP) && defined(SECURE_NO_SETUID_FIXUP)
+#define SECBIT_NO_SETUID_FIXUP (issecure_mask(SECURE_NO_SETUID_FIXUP))
+#endif
+#if !defined(SECBIT_NO_SETUID_FIXUP_LOCKED) && defined(SECURE_NO_SETUID_FIXUP_LOCKED)
+#define SECBIT_NO_SETUID_FIXUP_LOCKED (issecure_mask(SECURE_NO_SETUID_FIXUP_LOCKED))
+#endif
+#if !defined(SECBIT_NOROOT) && defined(SECURE_NOROOT)
+#define SECBIT_NOROOT (issecure_mask(SECURE_NOROOT))
+#endif
+#if !defined(SECBIT_NOROOT_LOCKED) && defined(SECURE_NOROOT_LOCKED)
+#define SECBIT_NOROOT_LOCKED (issecure_mask(SECURE_NOROOT_LOCKED))
+#endif
#endif
#include "fuse.h"

View File

@ -1,20 +1,14 @@
Name: fuse3
Version: 3.4.2
Release: 7%{?dist}
Version: 3.5.0
Release: 1%{?dist}
Summary: File System in Userspace (FUSE) v3 utilities
License: GPL+
URL: http://fuse.sf.net
Source0: https://github.com/libfuse/libfuse/archive/fuse-%{version}.tar.gz
Source1: fuse.conf
Patch1: fuse3-0001-More-parentheses.patch
Patch2: fuse3-0002-disable-device-creation-during-build-install.patch
# https://bugzilla.redhat.com/1694552#c7
# https://github.com/libfuse/libfuse/pull/392
# backported for fuse-3.4.2
Patch3: fuse3-0003-Whitelist-smb2-392.patch
# https://github.com/libfuse/libfuse/pull/409
Patch4: fuse3-0004-support-el6-kernel.patch
# https://github.com/libfuse/libfuse/pull/421
Patch1: fuse3-0001-no-chown-root.patch
BuildRequires: which
%if ! 0%{?el6}
@ -75,10 +69,7 @@ Common files for FUSE v2 and FUSE v3.
%prep
%setup -n libfuse-fuse-%{version}
%patch1 -p1 -b .add_parentheses
%patch2 -p1 -b .nodev
%patch3 -p1 -b .smb2_whitelist
%patch4 -p1 -b .el6_compile
%patch1 -p1 -b .no_chown_root
%build
export LC_ALL=en_US.UTF-8
@ -160,6 +151,9 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
%endif
%changelog
* Fri May 24 2019 Dave Dykstra <dwd@fedoraproject.org> - 3.5.0-1
- Upgrade to upstream 3.5.0
* Sat May 04 2019 Dave Dykstra <dwd@fedoraproject.org> - 3.4.2-7
- Fix building on el6

View File

@ -1 +1 @@
SHA512 (fuse-3.4.2.tar.gz) = ba59f261a51803517cf5d131a74455cf3143e80382c9a9612037cbce9941af867d379955417c384fe0b28e31b5a16f9d0ff35337c7e565830767879458c942be
SHA512 (fuse-3.5.0.tar.gz) = f890807f578c9c7215a1804a5fbb8f00df59b99709b04501b3824bc14100fac26f29f764c5f17a83d11f1486a0769da908983ef6b3c6860e6da14f86d8378c37