add back patch for el6 compile

This commit is contained in:
Dave Dykstra 2019-05-24 11:50:27 -05:00
parent 0f626619b3
commit e119932832
2 changed files with 33 additions and 0 deletions

View File

@ -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 <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

@ -9,6 +9,8 @@ Source1: fuse.conf
# https://github.com/libfuse/libfuse/pull/421 # https://github.com/libfuse/libfuse/pull/421
Patch1: fuse3-0001-no-chown-root.patch Patch1: fuse3-0001-no-chown-root.patch
# https://github.com/libfuse/libfuse/pull/409
Patch2: fuse3-0002-support-el6-kernel.patch
BuildRequires: which BuildRequires: which
%if ! 0%{?el6} %if ! 0%{?el6}
@ -70,6 +72,7 @@ Common files for FUSE v2 and FUSE v3.
%setup -n libfuse-fuse-%{version} %setup -n libfuse-fuse-%{version}
%patch1 -p1 -b .no_chown_root %patch1 -p1 -b .no_chown_root
%patch2 -p1 -b .el6_compile
%build %build
export LC_ALL=en_US.UTF-8 export LC_ALL=en_US.UTF-8