35 lines
976 B
Diff
35 lines
976 B
Diff
From 0e1ac8c94120b522e20589512ee229790362c914 Mon Sep 17 00:00:00 2001
|
|
From: Anakin Zhang <benjamin93@163.com>
|
|
Date: Tue, 1 Sep 2020 19:50:56 +0800
|
|
Subject: [PATCH] set user.digest_list in repair-meta-digest-lists
|
|
|
|
Signed-off-by: Anakin Zhang <benjamin93@163.com>
|
|
---
|
|
lib/compact_list.c | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/compact_list.c b/lib/compact_list.c
|
|
index f2667f4..0c73ec8 100644
|
|
--- a/lib/compact_list.c
|
|
+++ b/lib/compact_list.c
|
|
@@ -787,8 +787,15 @@ int process_lists(int dirfd, int fd, int save, int verbose,
|
|
ret = gen_write_ima_xattr(xattr, &xattr_len, path,
|
|
DIGEST_LIST_ALGO, digest,
|
|
true, true);
|
|
- if (ret < 0)
|
|
+ if (ret < 0) {
|
|
printf("Cannot set IMA xattr to %s\n", path);
|
|
+ break;
|
|
+ }
|
|
+
|
|
+ ret = lsetxattr(path, "user.digest_list", "1", 1, 0);
|
|
+ if (ret < 0)
|
|
+ printf("Cannot add user.digest_list to %s\n",
|
|
+ path);
|
|
|
|
break;
|
|
default:
|
|
--
|
|
2.23.0.windows.1
|
|
|