[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <8ccfc9ba88a466cf046c366f07e994ca7a46ac0a.1548406793.git.geliangtang@gmail.com>
Date: Fri, 25 Jan 2019 17:14:50 +0800
From: Geliang Tang <geliangtang@...il.com>
To: Phillip Lougher <phillip@...ashfs.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Coly Li <colyli@...e.de>
Cc: Geliang Tang <geliangtang@...il.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v5 2/2] squashfs-tools: Add posix acl support
This patch adds posix acl (Access Control Lists) support to squashfs-tools.
Signed-off-by: Geliang Tang <geliangtang@...il.com>
---
squashfs-tools/read_xattrs.c | 2 ++
squashfs-tools/squashfs_fs.h | 12 +++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/squashfs-tools/read_xattrs.c b/squashfs-tools/read_xattrs.c
index 42106f5..8ef8291 100644
--- a/squashfs-tools/read_xattrs.c
+++ b/squashfs-tools/read_xattrs.c
@@ -64,6 +64,8 @@ static long long xattr_table_start;
*/
struct prefix prefix_table[] = {
{ "user.", SQUASHFS_XATTR_USER },
+ { "system.", SQUASHFS_XATTR_POSIX_ACL_ACCESS },
+ { "system.", SQUASHFS_XATTR_POSIX_ACL_DEFAULT },
{ "trusted.", SQUASHFS_XATTR_TRUSTED },
{ "security.", SQUASHFS_XATTR_SECURITY },
{ "", -1 }
diff --git a/squashfs-tools/squashfs_fs.h b/squashfs-tools/squashfs_fs.h
index afca918..040035c 100644
--- a/squashfs-tools/squashfs_fs.h
+++ b/squashfs-tools/squashfs_fs.h
@@ -122,11 +122,13 @@
#define SQUASHFS_LSOCKET_TYPE 14
/* Xattr types */
-#define SQUASHFS_XATTR_USER 0
-#define SQUASHFS_XATTR_TRUSTED 1
-#define SQUASHFS_XATTR_SECURITY 2
-#define SQUASHFS_XATTR_VALUE_OOL 256
-#define SQUASHFS_XATTR_PREFIX_MASK 0xff
+#define SQUASHFS_XATTR_USER 0
+#define SQUASHFS_XATTR_POSIX_ACL_ACCESS 1
+#define SQUASHFS_XATTR_POSIX_ACL_DEFAULT 2
+#define SQUASHFS_XATTR_TRUSTED 3
+#define SQUASHFS_XATTR_SECURITY 4
+#define SQUASHFS_XATTR_VALUE_OOL 256
+#define SQUASHFS_XATTR_PREFIX_MASK 0xff
/* Flag whether block is compressed or uncompressed, bit is set if block is
* uncompressed */
--
2.17.1
Powered by blists - more mailing lists