summaryrefslogtreecommitdiffstats
path: root/fsade.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-03-28 11:16:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-03-28 11:17:16 -0400
commitcd4b0f1d87e836e78c2de92623e20284a057b500 (patch)
tree0566ed5557f1fdd4ae012750354dec14b2b9ad10 /fsade.c
parentf9c18e80595fae26f1d45dab5427c7122d15cb35 (diff)
downloadbfs-cd4b0f1d87e836e78c2de92623e20284a057b500.tar.xz
fsade: Fix msan false positive in bfs_check_acl_type()
Diffstat (limited to 'fsade.c')
-rw-r--r--fsade.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fsade.c b/fsade.c
index 7ba7a43..1444cf4 100644
--- a/fsade.c
+++ b/fsade.c
@@ -171,6 +171,12 @@ static int bfs_check_acl_type(acl_t acl, acl_type_t type) {
#if __FreeBSD__
int trivial;
+
+#if BFS_HAS_FEATURE(memory_sanitizer, false)
+ // msan seems to be missing an interceptor for acl_is_trivial_np()
+ trivial = 0;
+#endif
+
if (acl_is_trivial_np(acl, &trivial) < 0) {
return -1;
} else if (trivial) {
@@ -178,9 +184,9 @@ static int bfs_check_acl_type(acl_t acl, acl_type_t type) {
} else {
return 1;
}
-#endif
-
+#else // !__FreeBSD__
return bfs_check_posix1e_acl(acl, true);
+#endif
}
int bfs_check_acl(const struct BFTW *ftwbuf) {