Repository navigation
feat(index): integrate trust client and D-Bus event relay - #278
Conversation
Add trust negotiation with deepin-security-loader via fd passing, switch VfsMonitor to D-Bus GetEventChannel relay, enable systemd notify and journal logging. 添加与deepin-security-loader的信任协商,通过fd传递实现; VfsMonitor事件通道从Unix socket切换到D-Bus GetEventChannel 中继;启用systemd notify和journal日志重定向。 Log: 集成安全信任客户端与D-Bus事件中继 PMS: BUG-370779 Influence: 索引服务启动时需通过deepin-security-loader信任验证,事件接收改为D-Bus中继方式,安装路径迁移至libexec/deepin。
|
Sorry @wangrong1069, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 6 days and 10 hours by commenting |
|
Warning
详情 {
"unset": {
"autotests/index/test_vfsmonitorfilesystemwatcher.cpp": {
"a": [
" qunsetenv(\"DFM_VFSMONITOR_SOCKET_PATH\");",
" qunsetenv(\"DFM_VFSMONITOR_SOCKET_PATH\");",
" qunsetenv(\"DFM_VFSMONITOR_SOCKET_PATH\");",
" qunsetenv(\"DFM_VFSMONITOR_SOCKET_PATH\");",
" qunsetenv(\"DFM_VFSMONITOR_SOCKET_PATH\");",
" qunsetenv(\"DFM_VFSMONITOR_MAX_QUEUE\");"
]
}
}
} |
Reviewer's GuideThe index service now performs optional fd-based D-Bus trust authorization during startup, receives filesystem events through the Anything D-Bus relay instead of a fixed Unix socket, applies device-aware mount filtering, and is packaged as a systemd/journal-integrated libexec service. Sequence diagram for index startup trust negotiationsequenceDiagram
participant Loader as deepin-security-loader
participant Index as deepin-anything-index
participant Bus as SystemBus
Loader->>Index: exec with --fd1 and --fd2
Index->>Bus: g_bus_get_sync
Bus-->>Index: unique bus name
Index->>Loader: write_all trust request JSON
Loader-->>Index: trust response JSON
alt Result is true
Index->>Index: registerIndexServices
else Result is false or invalid
Index-->>Loader: exit with failure
end
Sequence diagram for D-Bus filesystem event relaysequenceDiagram
participant Monitor as VfsMonitorFileSystemWatcher
participant Relay as org.deepin.Anything
participant Reader as VfsSocketReader
participant Index as Index event processor
Monitor->>Relay: event_relay_receiver_get_fd
Relay-->>Monitor: fd and protocol_id
Monitor->>Monitor: dup fd and startReaderThread
Relay-->>Reader: fs_event over SOCK_SEQPACKET
Reader->>Reader: recv and resolveAndFilterFullPath
Reader->>Index: flushPendingBatch
alt mount event
Reader->>Reader: initMountPoints
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, wangrong1069 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 |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
3efe9dc
into
linuxdeepin:develop/snipe-20260923
Add trust negotiation with deepin-security-loader via fd passing, switch VfsMonitor to D-Bus GetEventChannel relay, enable systemd notify and journal logging.
添加与deepin-security-loader的信任协商,通过fd传递实现;
VfsMonitor事件通道从Unix socket切换到D-Bus GetEventChannel 中继;启用systemd notify和journal日志重定向。
Log: 集成安全信任客户端与D-Bus事件中继
PMS: BUG-370779
Influence: 索引服务启动时需通过deepin-security-loader信任验证,事件接收改为D-Bus中继方式,安装路径迁移至libexec/deepin。
Summary by Sourcery
Integrate trusted D-Bus startup and event-relay support into the index service while aligning logging, packaging, and filesystem monitoring with the new runtime architecture.
New Features:
Enhancements:
Build:
Deployment:
Tests: