Skip to content

refactor: migrate update log monitoring to DBus interface#150

Merged
mhduiy merged 1 commit into
linuxdeepin:masterfrom
mhduiy:log
Aug 1, 2025
Merged

refactor: migrate update log monitoring to DBus interface#150
mhduiy merged 1 commit into
linuxdeepin:masterfrom
mhduiy:log

Conversation

@mhduiy

@mhduiy mhduiy commented Jul 31, 2025

Copy link
Copy Markdown
Contributor
  1. Replace file system watcher with DBus-based log monitoring

  2. Implement pipe-based log data transfer for better security

  3. Add historical and realtime log fetching capabilities

  4. Introduce systemd service for secure log file copying

  5. Fix potential security issues with file permissions

  6. 从文件系统监控改为基于DBus的日志监控

  7. 实现基于管道的日志数据传输以提高安全性

  8. 添加历史日志和实时日志获取功能

  9. 引入systemd服务实现安全的日志文件复制

  10. 修复文件权限相关的潜在安全问题

refactor: 迁移更新日志监控到DBus接口

  1. 将文件系统监控替换为基于DBus的日志监控
  2. 实现基于管道的日志数据传输以提高安全性
  3. 添加历史日志和实时日志获取功能
  4. 引入systemd服务实现安全的日志文件复制
  5. 修复文件权限相关的潜在安全问题

1. Replace file system watcher with DBus-based log monitoring
2. Implement pipe-based log data transfer for better security
3. Add historical and realtime log fetching capabilities
4. Introduce systemd service for secure log file copying
5. Fix potential security issues with file permissions

1. 从文件系统监控改为基于DBus的日志监控
2. 实现基于管道的日志数据传输以提高安全性
3. 添加历史日志和实时日志获取功能
4. 引入systemd服务实现安全的日志文件复制
5. 修复文件权限相关的潜在安全问题

refactor: 迁移更新日志监控到DBus接口

1. 将文件系统监控替换为基于DBus的日志监控
2. 实现基于管道的日志数据传输以提高安全性
3. 添加历史日志和实时日志获取功能
4. 引入systemd服务实现安全的日志文件复制
5. 修复文件权限相关的潜在安全问题
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

代码审查意见:

  1. LogWatcherHelper类的构造函数中,m_dbusProxy参数被添加,但未在类声明中更新,可能会导致编译错误。
  2. LogWatcherHelper类中的startWatchFile函数在m_dbusProxy为空时返回,但没有抛出异常或错误提示,可能会使问题难以排查。
  3. LogWatcherHelper类中的setupLogPipe函数在创建管道失败时没有返回错误,应该处理错误情况。
  4. LogWatcherHelper类中的startRealtimeLogAfterHistory函数在获取实时日志时没有处理可能的错误情况。
  5. LogWatcherHelper类中的onDataAvailable函数在读取数据时没有处理可能的错误情况。
  6. UpdateWorker类中的exportLogToDesktop函数在创建临时目录时没有处理可能的错误情况。
  7. UpdateWorker类中的exportLogToDesktop函数在创建临时文件时没有处理可能的错误情况。
  8. UpdateWorker类中的exportLogToDesktop函数在启动复制服务时没有处理可能的错误情况。
  9. copy-update-log.sh脚本在处理文件权限时使用了chmod,但没有检查chmod的返回值,可能会导致权限设置失败。
  10. copy-update-log.sh脚本在处理文件所有者时使用了chown,但没有检查chown的返回值,可能会导致所有者设置失败。
  11. copy-update-log.sh脚本在清理临时文件时使用了rm -f,但没有处理可能的错误情况。
  12. copy-update-log.sh脚本在清理临时目录时使用了rmdir,但没有处理可能的错误情况。
  13. deepin-update-log-copy@.service服务在启动时使用了%i作为参数,但没有在服务定义中说明参数的用途和格式。
  14. deepin-update-log-copy@.service服务在启动时使用了systemctl命令,但没有处理可能的错误情况。

总的来说,代码中存在一些潜在的错误处理问题,建议在关键操作后添加适当的错误处理和日志记录,以提高代码的健壮性和可维护性。

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602, mhduiy, xionglinlin

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mhduiy mhduiy merged commit c5faa35 into linuxdeepin:master Aug 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants