Repository navigation
fix: disable strongswan autostart in postinst - #647
Merged
Merged
Conversation
1. Add `systemctl disable strongswan` to dcc-network-plugin.postinst, alongside the existing ipsec/xl2tpd/openvpn disables. 2. strongSwan 6.x ships only a native systemd unit (strongswan.service), no LSB init script, so update-rc.d cannot handle it; use systemctl disable instead. 3. The `ipsec` entry maps to /etc/init.d/ipsec from strongswan-starter, the legacy SysV stack; the `strongswan` metapackage instead installs the systemd stack (charon-systemd + strongswan-swanctl), so that entry is a no-op here. strongswan comes in via the network-manager-strongswan dependency, and its strongswan.service declares WantedBy=multi-user.target, so it autostarts once installed. Log: unreviewed strongswan.service no longer autostarts (security baseline) Influence: 1. Fresh install: `systemctl list-unit-files | grep strongswan` shows disabled; strongswan.service must not autostart at boot. 2. Upgrade existing install: postinst re-run emits no error and strongswan.service ends up disabled. 3. IPsec VPN via NetworkManager still works (backend started on demand). PMS: BUG-379501 fix: postinst 中禁用 strongswan 自启 1. 在 dcc-network-plugin.postinst 中新增 `systemctl disable strongswan`, 与已有的 ipsec/xl2tpd/openvpn 禁用逻辑并列。 2. strongSwan 6.x 仅提供原生 systemd 单元(strongswan.service),无 LSB init 脚本,update-rc.d 无法处理,需改用 systemctl disable。 3. 上面的 `ipsec` 对应 strongswan-starter 提供的 /etc/init.d/ipsec,属传统 SysV 栈;而 `strongswan` 元包实际安装的是 systemd 栈(charon-systemd + strongswan-swanctl),故该条在此为空操作。strongswan 经 network-manager-strongswan 依赖引入,其 strongswan.service 声明 WantedBy=multi-user.target,安装即开机自启。 Log: 系统自启服务不再包含未经评审的 strongswan.service(安全基线) Influence: 1. 全新安装:`systemctl list-unit-files | grep strongswan` 应为 disabled, 开机不再自启 strongswan.service。 2. 升级安装:重跑 postinst 无报错,strongswan.service 被禁用。 3. 通过 NetworkManager 使用 IPsec VPN 仍正常(后端按需启动)。 PMS: BUG-379501
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the post-installation script to disable File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
mhduiy
approved these changes
Oct 21, 2026
|
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
systemctl disable strongswanto dcc-network-plugin.postinst, alongside the existing ipsec/xl2tpd/openvpn disables.ipsecentry maps to /etc/init.d/ipsec from strongswan-starter, the legacy SysV stack; thestrongswanmetapackage instead installs the systemd stack (charon-systemd + strongswan-swanctl), so that entry is a no-op here. strongswan comes in via the network-manager-strongswan dependency, and its strongswan.service declares WantedBy=multi-user.target, so it autostarts once installed.Log: unreviewed strongswan.service no longer autostarts (security baseline)
Influence:
systemctl list-unit-files | grep strongswanshows disabled; strongswan.service must not autostart at boot.PMS: BUG-379501
fix: postinst 中禁用 strongswan 自启
systemctl disable strongswan, 与已有的 ipsec/xl2tpd/openvpn 禁用逻辑并列。ipsec对应 strongswan-starter 提供的 /etc/init.d/ipsec,属传统 SysV 栈;而strongswan元包实际安装的是 systemd 栈(charon-systemd + strongswan-swanctl),故该条在此为空操作。strongswan 经 network-manager-strongswan 依赖引入,其 strongswan.service 声明 WantedBy=multi-user.target,安装即开机自启。Log: 系统自启服务不再包含未经评审的 strongswan.service(安全基线)
Influence:
systemctl list-unit-files | grep strongswan应为 disabled, 开机不再自启 strongswan.service。PMS: BUG-379501
Summary by Sourcery
Bug Fixes: