diff --git a/fuse3-0002-support-el6-kernel.patch b/fuse3-0002-support-el6-kernel.patch new file mode 100644 index 0000000..f42dc5c --- /dev/null +++ b/fuse3-0002-support-el6-kernel.patch @@ -0,0 +1,30 @@ +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 + #include + #include ++/* 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" diff --git a/fuse3.spec b/fuse3.spec index 8559748..87dea5e 100644 --- a/fuse3.spec +++ b/fuse3.spec @@ -9,6 +9,8 @@ Source1: fuse.conf # https://github.com/libfuse/libfuse/pull/421 Patch1: fuse3-0001-no-chown-root.patch +# https://github.com/libfuse/libfuse/pull/409 +Patch2: fuse3-0002-support-el6-kernel.patch BuildRequires: which %if ! 0%{?el6} @@ -70,6 +72,7 @@ Common files for FUSE v2 and FUSE v3. %setup -n libfuse-fuse-%{version} %patch1 -p1 -b .no_chown_root +%patch2 -p1 -b .el6_compile %build export LC_ALL=en_US.UTF-8