40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
|
|
From 2b39cac80efe7327b6d68fe01934919bc41249b8 Mon Sep 17 00:00:00 2001
|
||
|
|
From: fly_1997 <flylove7@outlook.com>
|
||
|
|
Date: Tue, 10 Dec 2024 21:46:27 +0800
|
||
|
|
Subject: [PATCH] change the folder permission to 755, add oeaware group
|
||
|
|
permission to liboeaware-sdk.so
|
||
|
|
|
||
|
|
---
|
||
|
|
rpm/oeAware.spec | 1 +
|
||
|
|
src/common/utils.cpp | 2 +-
|
||
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/rpm/oeAware.spec b/rpm/oeAware.spec
|
||
|
|
index 5fbaf1f..4c01d0a 100644
|
||
|
|
--- a/rpm/oeAware.spec
|
||
|
|
+++ b/rpm/oeAware.spec
|
||
|
|
@@ -60,6 +60,7 @@ install -D -m 0640 ./build/output/plugin/lib/xcall.yaml %{buildroot}%{
|
||
|
|
%post
|
||
|
|
if ! grep -q "oeaware:" /etc/group; then
|
||
|
|
groupadd oeaware
|
||
|
|
+ setfacl -m g:oeaware:r /usr/lib64/liboeaware-sdk.so
|
||
|
|
fi
|
||
|
|
systemctl start oeaware.service
|
||
|
|
chcon -t modules_object_t %{_prefix}/lib/smc/smc_acc.ko >/dev/null 2>&1
|
||
|
|
diff --git a/src/common/utils.cpp b/src/common/utils.cpp
|
||
|
|
index 8f63a70..b118235 100644
|
||
|
|
--- a/src/common/utils.cpp
|
||
|
|
+++ b/src/common/utils.cpp
|
||
|
|
@@ -167,7 +167,7 @@ bool CreateDir(const std::string &path)
|
||
|
|
if (stat(subPath.c_str(), &buffer) == 0) {
|
||
|
|
continue;
|
||
|
|
}
|
||
|
|
- if (mkdir(subPath.c_str(), S_IRWXU | S_IRWXG) != 0) {
|
||
|
|
+ if (mkdir(subPath.c_str(), S_IRWXU | S_IXGRP | S_IRGRP | S_IROTH | S_IXOTH) != 0) {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
} while (pos != std::string::npos);
|
||
|
|
--
|
||
|
|
2.45.2.windows.1
|
||
|
|
|