Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: systemd hardening #86

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

zsien
Copy link
Contributor

@zsien zsien commented Jun 25, 2024

加固 dbus 进程

@zsien zsien force-pushed the zs/systemdhardening branch 6 times, most recently from 1ca33fe to 1c1cd92 Compare June 26, 2024 06:37
# Make ${localstatedir}/lib/dde-dconfig-daemon (required for systemd < 237)
# Adjust mode and ownership if it already exists.

d /var/lib/dde-dconfig-daemon 0755 dde-dconfig-daemon - -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个能保留么? 这里需要设置目录权限,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUSE 安全团队认为至少是 .cache 目录应该是 0700 权限。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这样的话, 这个是不是更应该保留了, 值换成0700,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,应该换成 0700 .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改到了 systemd service 的 StateDirectory=dde-dconfig-daemon

@@ -2,4 +2,4 @@
Name=org.desktopspec.ConfigManager
Exec=/usr/bin/dde-dconfig-daemon
User=dde-dconfig-daemon
SystemdService=dde-dconfig-daemon.service
SystemdService=dbus-org.desktopspec.ConfigManager.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名字直接用org.desktopspec.ConfigManager, 不加dbus-

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbus 服务都是 dbus- 开头,所以这里要么用 dde-dconfig-daemon.service,要么用 dbus-org.desktopspec.ConfigManager.service

@18202781743
Copy link
Contributor

@hillwoodroc 帮忙瞅瞅哈,

@zsien zsien force-pushed the zs/systemdhardening branch from 1c1cd92 to ad4cc51 Compare September 2, 2024 07:57
@zsien zsien force-pushed the zs/systemdhardening branch from ad4cc51 to 1f23dad Compare September 2, 2024 08:05
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 移除了dde-dconfig-daemon.tmpfiles的安装,可能会影响依赖此配置文件的系统服务。
  • ReadOnlyPaths变量被添加,但未提供上下文说明其用途。
  • StateDirectoryStateDirectoryMode的设置可能导致权限问题,应确保它们的使用符合项目需求。
  • ProtectSystem=fullProtectHome=yes设置可能限制了daemon的运行环境,应确保这些设置不会对生产环境造成负面影响。
  • SystemdService变量被更新,但未提供上下文说明为何需要更改。

是否建议立即修改:

  • 是,特别是如果移除dde-dconfig-daemon.tmpfiles会导致系统服务无法正常工作,或者新的权限设置与项目需求不符。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, zsien

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

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

@zsien
Copy link
Contributor Author

zsien commented Sep 2, 2024

/merge

@deepin-bot deepin-bot bot merged commit 0cc458a into linuxdeepin:master Sep 2, 2024
18 checks passed
@zsien zsien deleted the zs/systemdhardening branch September 2, 2024 09:10
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