summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrDaveD <2129743+DrDaveD@users.noreply.github.com>2019-05-05 12:36:14 -0500
committerNikolaus Rath <Nikolaus@rath.org>2019-05-05 14:15:13 -0400
commit625ed81b823b927ce7fdb1d34def624ceb2f3553 (patch)
tree445c242b7205d3570109f46356c775913e63ddd0
parent0c59e2b509e869f163e7e8487aded4705d7b4270 (diff)
downloadfuse-625ed81b823b927ce7fdb1d34def624ceb2f3553.tar.gz
add defines for missing SECBITs on older kernels (#409)
-rw-r--r--util/mount.fuse.c19
1 files changed, 19 insertions, 0 deletions
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"