acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Acl-devel] [PATCH acl] Enable large-file support on systems that do not


From: Dmitry V. Levin
Subject: [Acl-devel] [PATCH acl] Enable large-file support on systems that do not enable it by default
Date: Tue, 28 Nov 2017 02:56:03 +0300

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
---
 configure.ac          | 1 +
 test/Makemodule.am    | 1 +
 test/getfacl-lfs.test | 7 +++++++
 3 files changed, 9 insertions(+)
 create mode 100644 test/getfacl-lfs.test

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

-- 
ldv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]