summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-22 10:22:57 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-22 11:19:20 -0400
commit3d58ea8f735ce57a62fc678ca36b388b9c731c83 (patch)
tree2daac0e57068f7702b33b6094a1df9def86fd7d2
parentb2d31717511bd21854840bd69875ca80b875137a (diff)
downloadbfs-3d58ea8f735ce57a62fc678ca36b388b9c731c83.tar.xz
fsade: Simplify BFS_CAN_CHECK_CAPABILITIES
-rw-r--r--src/fsade.h7
-rw-r--r--src/prelude.h7
2 files changed, 1 insertions, 13 deletions
diff --git a/src/fsade.h b/src/fsade.h
index 6300852..cd5c34f 100644
--- a/src/fsade.h
+++ b/src/fsade.h
@@ -13,12 +13,7 @@
#define BFS_CAN_CHECK_ACL BFS_USE_SYS_ACL_H
-#if !defined(BFS_CAN_CHECK_CAPABILITIES) && BFS_USE_SYS_CAPABILITY_H
-# include <sys/capability.h>
-# ifdef CAP_CHOWN
-# define BFS_CAN_CHECK_CAPABILITIES true
-# endif
-#endif
+#define BFS_CAN_CHECK_CAPABILITIES BFS_USE_LIBCAP
#define BFS_CAN_CHECK_CONTEXT BFS_USE_LIBSELINUX
diff --git a/src/prelude.h b/src/prelude.h
index 9e64260..bf87386 100644
--- a/src/prelude.h
+++ b/src/prelude.h
@@ -52,9 +52,6 @@ extern const char bfs_version[];
#if __has_include(<sys/acl.h>)
# define BFS_HAS_SYS_ACL_H true
#endif
-#if __has_include(<sys/capability.h>)
-# define BFS_HAS_SYS_CAPABILITY_H true
-#endif
#if __has_include(<sys/extattr.h>)
# define BFS_HAS_SYS_EXTATTR_H true
#endif
@@ -82,7 +79,6 @@ extern const char bfs_version[];
#define BFS_HAS_MNTENT_H __GLIBC__
#define BFS_HAS_PATHS_H true
#define BFS_HAS_SYS_ACL_H true
-#define BFS_HAS_SYS_CAPABILITY_H __linux__
#define BFS_HAS_SYS_EXTATTR_H __FreeBSD__
#define BFS_HAS_SYS_MKDEV_H false
#define BFS_HAS_SYS_PARAM_H true
@@ -102,9 +98,6 @@ extern const char bfs_version[];
#ifndef BFS_USE_SYS_ACL_H
# define BFS_USE_SYS_ACL_H (BFS_HAS_SYS_ACL_H && !__illumos__ && (!__linux__ || BFS_USE_LIBACL))
#endif
-#ifndef BFS_USE_SYS_CAPABILITY_H
-# define BFS_USE_SYS_CAPABILITY_H (BFS_HAS_SYS_CAPABILITY_H && !__FreeBSD__ && (!__linux__ || BFS_USE_LIBCAP))
-#endif
#ifndef BFS_USE_SYS_EXTATTR_H
# define BFS_USE_SYS_EXTATTR_H BFS_HAS_SYS_EXTATTR_H
#endif