chore: update changelog to 2.0.27#217
Conversation
update changelog to 2.0.27 Log: update changelog to 2.0.27
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the Debian changelog metadata to reflect release 2.0.27 targeting master, with no code or behavior changes. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot TAG: 2.0.27 |
deepin pr auto review★ 总体评分:40分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 diff --git a/src/dde-lock/lockworker.cpp b/src/dde-lock/lockworker.cpp
index 1234567..abcdefg 100644
--- a/src/dde-lock/lockworker.cpp
+++ b/src/dde-lock/lockworker.cpp
@@ -730,6 +730,25 @@ void LockWorker::setLocked(const bool locked)
{
+ // 获取调用者PID
+ pid_t callerPid = connection().interface()->servicePid(message().service()).value();
+ char exePath[PATH_MAX] = {0};
+ ssize_t len = readlink(QString("/proc/%1/exe").arg(callerPid).toUtf8().constData(), exePath, sizeof(exePath) - 1);
+ if (len <= 0) {
+ qWarning() << "Failed to get caller exe path";
+ return;
+ }
+ exePath[len] = '\0';
+ QString callerPath(exePath);
+
+ // 定义合法的调用者路径列表
+ QStringList validPaths = {
+ "/usr/bin/dde-lock",
+ "/usr/lib/deepin-daemon/dde-lock"
+ };
+
+ // 校验调用者路径是否在合法列表中
+ if (!validPaths.contains(callerPath)) {
+ qWarning() << "Unauthorized caller path:" << callerPath;
+ return;
+ }
+
// 原有锁屏状态设置逻辑 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot ✅ Tag created successfully 📋 Tag Details
|
更新说明
自动更新 changelog 到版本 2.0.27
变更内容
版本信息
Summary by Sourcery
Documentation: