Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ACL clearing support (fixing FreeBSD build) #9491

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ case "$host_os" in
esac
AC_SUBST(HAVE_SECCOMP, [$have_seccomp])

# Optional dependencies for better normalizing file system data
AC_CHECK_HEADERS[sys/xattr.h]

# Look for aws-cpp-sdk-s3.
AC_LANG_PUSH(C++)
Expand Down
1 change: 0 additions & 1 deletion src/libstore/local-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sys/statvfs.h>
#include <sys/mount.h>
#include <sys/ioctl.h>
#include <sys/xattr.h>
#endif

#ifdef __CYGWIN__
Expand Down
6 changes: 4 additions & 2 deletions src/libstore/posix-fs-canonicalise.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <sys/xattr.h>
#if HAVE_SYS_XATTR_H
# include <sys/xattr.h>
#endif

#include "posix-fs-canonicalise.hh"
#include "file-system.hh"
Expand Down Expand Up @@ -76,7 +78,7 @@ static void canonicalisePathMetaData_(
if (!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode)))
throw Error("file '%1%' has an unsupported type", path);

#if __linux__
#ifdef HAVE_SYS_XATTR_H
/* Remove extended attributes / ACLs. */
ssize_t eaSize = llistxattr(path.c_str(), nullptr, 0);

Expand Down
Loading