initramfs: add file metadata
hulk inclusion
category: feature
feature: IMA Digest Lists extension
bugzilla: 46797
-------------------------------------------------
This patch adds metadata to a file from a supplied buffer. The buffer might
contains multiple metadata records. The format of each record is:
<metadata len (ASCII, 8 chars)><version><type><metadata>
For now, only the TYPE_XATTR metadata type is supported. The specific
format of this metadata type is:
<xattr #N name>\0<xattr #N value>
[kamensky: fixed restoring of xattrs for symbolic links by using
sys_lsetxattr() instead of sys_setxattr()]
[sassu: removed state management, kept only do_setxattrs(), added support
for generic file metadata, replaced sys_lsetxattr() with
vfs_setxattr(), added check for entry_size, added check for
hdr->c_size, replaced strlen() with strnlen(); moved do_setxattrs()
before do_name()]
Signed-off-by:
Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by:
Victor Kamensky <kamensky@cisco.com>
Signed-off-by:
Taras Kondratiuk <takondra@cisco.com>
Signed-off-by:
Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by:
Tianxing Zhang <zhangtianxing3@huawei.com>
Reviewed-by:
Jason Yan <yanaijie@huawei.com>
Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment