-
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.
systemd: dynamic group for wsinstance sockets
Similar to the last commit, we create a dynamic group for the sockets in /run/cockpit/wsinstance and add a supplementary group to cockpit-tls.
- Loading branch information
1 parent
90e3c7f
commit 953b9a5
Showing
12 changed files
with
39 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ dist_systemdunit_DATA = \ | |
src/systemd/cockpit-wsinstance-http.socket \ | ||
src/systemd/cockpit-wsinstance-https-factory.socket \ | ||
src/systemd/[email protected] \ | ||
src/systemd/cockpit-wsinstance-socket-user.service \ | ||
$(NULL) | ||
|
||
# ----------------- | ||
|
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 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,11 @@ | ||
[Unit] | ||
Description=Dynamic user for /run/cockpit/wsinstance/ sockets | ||
BindsTo=cockpit.service | ||
|
||
[Service] | ||
DynamicUser=yes | ||
User=cockpit-wsinstance-socket | ||
Group=cockpit-wsinstance-socket | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,8 +73,8 @@ use of systemd features. | |
reads the fingerprint from stdin, and asks systemd to start a new | ||
[[email protected]](../src/ws/[email protected]) | ||
and .service pair. | ||
* Each instance runs in its own systemd cgroup, as another unprivileged system | ||
user `cockpit-wsinstance`. | ||
* Each instance runs in its own systemd cgroup, as another unprivileged | ||
dynamic system user `cockpit-wsinstance-socket`. | ||
* cockpit-tls exports the client certificates to `/run/cockpit/tls/<fingerprint>` | ||
while there is at least one open connection with that certificate, i. e. as | ||
long as there is an active Cockpit session. | ||
|
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 |
---|---|---|
|
@@ -387,6 +387,7 @@ authentication via sssd/FreeIPA. | |
%{_unitdir}/[email protected] | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/cockpit-wsinstance-socket-user.service | ||
%{_unitdir}/system-cockpithttps.slice | ||
%{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf | ||
%{_sysusersdir}/cockpit-wsinstance.conf | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ ${env:deb_systemdsystemunitdir}/[email protected] | |
${env:deb_systemdsystemunitdir}/cockpit-wsinstance-https-factory.socket | ||
${env:deb_systemdsystemunitdir}/[email protected] | ||
${env:deb_systemdsystemunitdir}/[email protected] | ||
${env:deb_systemdsystemunitdir}/cockpit-wsinstance-socket-user.service | ||
${env:deb_systemdsystemunitdir}/system-cockpithttps.slice | ||
${env:deb_pamlibdir}/security/pam_ssh_add.so | ||
${env:deb_pamlibdir}/security/pam_cockpit_cert.so | ||
|