fix logs redirection error and del rsa_pub.key

Signed-off-by: gaoyusong <gaoyusong1@huawei.com>
This commit is contained in:
gaoyusong 2022-03-14 17:28:22 +08:00
parent 06a7e6fc9a
commit 83246a81ba
2 changed files with 55 additions and 4 deletions

View File

@ -0,0 +1,50 @@
From a3a3a1e9e19f5595cb66fdc7928da70ca9f250a5 Mon Sep 17 00:00:00 2001
From: chenmaodong <chenmaodong@huawei.com>
Date: Wed, 8 Sep 2021 16:48:05 +0800
Subject: [PATCH] fix logs redirection error and delete
rsa_public_key_cloud.pem
PrintInfo will send the message from enclave to host with a program
name "[secGear]", however it'll print the wrong program name while
there are multi threads, so we delete this rule. On the same time, we
delete rsa_public_key_cloud.pem, because itrustee_sdk will provide it
Signed-off-by: chenmaodong <chenmaodong@huawei.com>
---
conf/rsyslog.d/secgear.conf | 3 +--
tools/sign_tool/cloud/rsa_public_key_cloud.pem | 11 -----------
2 files changed, 1 insertion(+), 13 deletions(-)
delete mode 100644 tools/sign_tool/cloud/rsa_public_key_cloud.pem
diff --git a/conf/rsyslog.d/secgear.conf b/conf/rsyslog.d/secgear.conf
index b835a94..7f1d898 100644
--- a/conf/rsyslog.d/secgear.conf
+++ b/conf/rsyslog.d/secgear.conf
@@ -1,6 +1,5 @@
#Do not modify this file
-if (($programname == 'teeos') or ($programname == 'secGear')) and \
- ($msg contains '[secGear]') then {
+if ($msg contains '[secGear]') then {
action(type="omfile" fileCreateMode="0600" file="/var/log/secgear/secgear.log")
stop
}
diff --git a/tools/sign_tool/cloud/rsa_public_key_cloud.pem b/tools/sign_tool/cloud/rsa_public_key_cloud.pem
deleted file mode 100644
index a321f63..0000000
--- a/tools/sign_tool/cloud/rsa_public_key_cloud.pem
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAzAPwbnbgBg7JgXERA9Bx
-p7GLI1S3e1zL83RMd2+GXb6kO4yMKUL3NUCE2HhA2BtQYmLyGovx59UUcKnU58is
-Xux++kH+A2shmOPjYvEFuX0Kt8tc19b8M9b/iHsY8ZmKykqia2a5U+IrECRFJo5p
-DWUnl7jrHVtq78BSR1c7iXG1frrEC0AYCuqKJo/fxfmOKL0Y9mENCB3nAwjn9unD
-BsO/OhkqvvB3nkeuMfNKPh4wCqtQPve13eTojbuxjX/3ePijplTI5X2Gr+n6Ximn
-fYRlytQmMgMl/db0ARSKNApq9bmwzVNrnGWWZWJksdRvf6iL7t17Gs4L9AApOuC9
-WkzxPvwp5ZUqjsGd4oJGWeC6ZE6BTw2vxE+xMFI9uAKHxq9pBKkcGMa0g4fANNNV
-+W+8JZGanxEXKB3y/M7BCyQAPCWOHC/RNjmRA1gczLYCPzC4pWu935UZdF1RR6zY
-CD3t+FoOGGET/g4CwWgyhb5qkp65Hs6ayYt/DUAqo+yBAgMBAAE=
------END PUBLIC KEY-----
--
1.8.3.1

View File

@ -1,6 +1,6 @@
Name: secGear
Version: 0.1.0
Release: 21%{?dist}
Release: 22%{?dist}
Summary: secGear is an SDK to develop confidential computing apps based on hardware enclave features
@ -48,6 +48,7 @@ Patch35: 0036-enclave-use-the-can-pull-image-from-hub.oepkgs.net.patch
Patch36: 0037-add-description-about-file-parameter-path-for-sign_t.patch
Patch37: 0038-fix-use-after-free-in-cc_enclave_create.patch
Patch38: 0039-clean-memory-when-it-come-to-error_handle.patch
Patch39: 0040-fix-logs-redirection-error-and-delete-rsa_public_key.patch
BuildRequires: gcc python automake autoconf libtool
BUildRequires: glibc glibc-devel cmake ocaml-dune rpm gcc-c++
@ -104,10 +105,8 @@ install -d %{buildroot}/%{_includedir}/secGear
install -d %{buildroot}/%{_bindir}
install -pm 751 bin/codegen %{buildroot}/%{_bindir}
install -pm 751 tools/sign_tool/sign_tool.sh %{buildroot}/%{_bindir}
install -d %{buildroot}/%{_sysconfdir}/secGear/cloud
install -d %{buildroot}/lib/secGear/
install -pm 751 tools/sign_tool/*.py %{buildroot}/lib/secGear
install -pm 644 tools/sign_tool/cloud/rsa_public_key_cloud.pem %{buildroot}/%{_sysconfdir}/secGear/cloud
%ifarch x86_64
install -pm 644 inc/host_inc/*.h %{buildroot}/%{_includedir}/secGear
install -pm 644 inc/host_inc/sgx/*.h %{buildroot}/%{_includedir}/secGear
@ -149,7 +148,6 @@ popd
%{_bindir}/*
%{_includedir}/secGear/*
/lib/secGear/*
%{_sysconfdir}/secGear/cloud/rsa_public_key_cloud.pem
%ifarch x86_64
%files sim
@ -163,6 +161,9 @@ popd
systemctl restart rsyslog
%changelog
* Mon Mar 14 2022 gaoyusong<gaoyusong1@huawei.com> - 0.1.0-22
- DESC: fix logs redirection error and del rsa_pub.key
* Tue Jan 11 2022 houmingyong<houmingyong@huawei.com> - 0.1.0-21
- DESC: fix no secgear.log after install secGear-devel