From 3c44aa44152a3e22c1e9f40849cca9ecf6e95429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A8=8A=E6=99=AF=E4=B9=90?= Date: Mon, 9 Jun 2025 16:12:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 樊景乐 --- services/param/base/param_base.c | 4 ++-- services/param/manager/param_manager.c | 2 +- services/param/watcher/proxy/watcher_manager.cpp | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/services/param/base/param_base.c b/services/param/base/param_base.c index a42c7d24a..41bfb3363 100644 --- a/services/param/base/param_base.c +++ b/services/param/base/param_base.c @@ -353,7 +353,7 @@ INIT_LOCAL_API int OpenWorkSpace(uint32_t index, int readOnly) if (workSpace->area == NULL) { ret = InitWorkSpace(workSpace, readOnly, workSpace->spaceSize); if (ret != 0) { - PARAM_LOGE("open WS %s err %d", workSpace->fileName, errno); + PARAM_LOGW("open WS %s err %d", workSpace->fileName, errno); } #ifndef PARAM_SUPPORT_SELINUX } @@ -526,7 +526,7 @@ STATIC_INLINE int SelinuxCheckParamPermission(const ParamLabelIndex *labelIndex, } if (ret != 0) { ret = SELINUX_RESULT_FORBIDED; - PARAM_LOGE("Selinux check name %s in %s [%d %d %d] failed", + PARAM_LOGW("Selinux check name %s in %s [%d %d %d] failed", name, GetSelinuxContent(name), srcLabel->cred.pid, srcLabel->cred.uid, srcLabel->cred.gid); } return ret; diff --git a/services/param/manager/param_manager.c b/services/param/manager/param_manager.c index a979c3b6b..da55e759c 100644 --- a/services/param/manager/param_manager.c +++ b/services/param/manager/param_manager.c @@ -694,7 +694,7 @@ static int CheckParamPermission_(WorkSpace **workspace, ParamTrieNode **node, labelIndex.selinuxLabelIndex = labelIndex.workspace->spaceIndex; int ret = paramSpace->checkParamPermission(&labelIndex, srcLabel, name, mode); - PARAM_CHECK(ret == 0, return ret, + PARAM_WARNING_CHECK(ret == 0, return ret, "deny access %s label %u %u", name, labelIndex.dacLabelIndex, labelIndex.selinuxLabelIndex); *workspace = labelIndex.workspace; return ret; diff --git a/services/param/watcher/proxy/watcher_manager.cpp b/services/param/watcher/proxy/watcher_manager.cpp index 54c6bcf9e..035a8e3ce 100644 --- a/services/param/watcher/proxy/watcher_manager.cpp +++ b/services/param/watcher/proxy/watcher_manager.cpp @@ -238,7 +238,10 @@ void WatcherGroup::ProcessParameterChange( if (remoteWatcher == nullptr) { return; } - WATCHER_LOGI("ProcessParameterChange key '%s' pid: %d", GetKeyPrefix().c_str(), remoteWatcher->GetAgentId()); + if (strcmp("startup.service.ctl.*", GetKeyPrefix().c_str())!= 0) { + WATCHER_LOGI("ProcessParameterChange key '%s' pid: %d", + GetKeyPrefix().c_str(), remoteWatcher->GetAgentId()); + } remoteWatcher->ProcessParameterChange(GetKeyPrefix(), name, value); }); } -- Gitee