-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: Use
DynamicUser
for cockpit.service
Since commit 644116a, the webserver certificates don't have to be owned by the cockpit-ws user/group any more. This allows us to use `DynamicUser` for cockpit.service, which eliminates the persistent `cockpit-ws` system user. The ordering matters a lot here to avoid race conditions: The wsinstance socket units need to start before cockpit.service (so the the first incoming request through cockpit.socket can get forwarded to an instance), but after the dynamic user got created. So we can't have cockpit.service create that dynamic user by itself. Instead, create a separate `cockpit-ws-user.service` helper unit that orders itself in between. Thanks to Allison Karlitskaya for the idea! Note that we can't yet eliminate `cockpit-wsinstance` as that's the owner of our `cockpit-session` suid root binary.
- Loading branch information
1 parent
f9a1472
commit d3594a5
Showing
11 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Dynamic user for cockpit-ws | ||
Documentation=man:cockpit-ws(8) | ||
BindsTo=cockpit.service | ||
|
||
[Service] | ||
DynamicUser=yes | ||
User=cockpit-ws | ||
Group=cockpit-ws | ||
Type=oneshot | ||
ExecStart=/bin/true | ||
RemainAfterExit=yes |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ tools/apparmor.d/cockpit-desktop etc/apparmor.d/ | |
${env:deb_systemdsystemunitdir}/cockpit.service | ||
${env:deb_systemdsystemunitdir}/cockpit-motd.service | ||
${env:deb_systemdsystemunitdir}/cockpit.socket | ||
${env:deb_systemdsystemunitdir}/cockpit-ws-user.service | ||
${env:deb_systemdsystemunitdir}/cockpit-wsinstance-http.service | ||
${env:deb_systemdsystemunitdir}/cockpit-wsinstance-http.socket | ||
${env:deb_systemdsystemunitdir}/[email protected] | ||
|
This file contains 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