summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-11-28 02:56:03 +0300
committerMike Frysinger <vapier@gentoo.org>2018-01-21 00:29:38 -0500
commitb29b81800d213624d1e6795ce1c9d4b94977bb7f (patch)
treea4ba85780245b4246a1f60a23e1e264f5ebabec4
parentfa5f6835e00c4927cae051328642b2a5a0d8b1c1 (diff)
downloadacl-b29b81800d213624d1e6795ce1c9d4b94977bb7f.tar.gz
Enable large-file support on systems that do not enable it by default
Invoke AC_SYS_LARGEFILE to enable large-file support. This fixes acl_get_fd and acl_get_file that invoke *stat functions, as well their users, perm_copy_fd and perm_copy_file. The tools are the most spectacularly affected because without the fix they just cannot process large files, e.g. $ truncate -s2G large-file && getfacl large-file getfacl: large-file: Value too large for defined data type
-rw-r--r--configure.ac1
-rw-r--r--test/Makemodule.am1
-rw-r--r--test/getfacl-lfs.test7
3 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0525c62..92d6faa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,7 @@ AM_PROG_CC_C_O
AC_USE_SYSTEM_EXTENSIONS
AC_FUNC_GCC_VISIBILITY
AC_C_BIGENDIAN
+AC_SYS_LARGEFILE
AM_PROG_AR
LT_INIT
diff --git a/test/Makemodule.am b/test/Makemodule.am
index 488d17e..17d4927 100644
--- a/test/Makemodule.am
+++ b/test/Makemodule.am
@@ -3,6 +3,7 @@ XFAIL_TESTS = \
test/nfs/nfs-dir.test
TESTS = \
test/cp.test \
+ test/getfacl-lfs.test \
test/getfacl-noacl.test \
test/getfacl-recursive.test \
test/malformed-restore.test \
diff --git a/test/getfacl-lfs.test b/test/getfacl-lfs.test
new file mode 100644
index 0000000..92d0057
--- /dev/null
+++ b/test/getfacl-lfs.test
@@ -0,0 +1,7 @@
+Check getfacl large-file support.
+This test can be run on a filesystem with large-file support.
+
+ $ umask 027
+ $ dd bs=65536 seek=32768 if=/dev/null of=large-file 2>/dev/null ||:
+ $ sh -c 'if test -f large-file; then getfacl large-file >/dev/null; fi'
+ $ rm large-file