From cd548123b18dcfed3c4ac3b4579ddb2cc9de7cf6 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Tue, 11 Jan 2022 08:52:06 +0100 Subject: [PATCH] systemd, tools: stop creating static cockpit-wsinstance user Co-Authored-By: Martin Pitt --- src/systemd/Makefile.am | 5 ----- src/systemd/sysusers.d/cockpit-wsinstance.conf | 1 - tools/cockpit.spec | 6 ------ tools/debian/cockpit-ws.install | 1 - tools/debian/rules | 4 ---- 5 files changed, 17 deletions(-) delete mode 100644 src/systemd/sysusers.d/cockpit-wsinstance.conf diff --git a/src/systemd/Makefile.am b/src/systemd/Makefile.am index 761b909c353e..75d6064beb83 100644 --- a/src/systemd/Makefile.am +++ b/src/systemd/Makefile.am @@ -59,11 +59,6 @@ tmpfilesconfdir = $(prefix)/lib/tmpfiles.d systemdgenerated += $(nodist_tmpfilesconf_DATA) nodist_tmpfilesconf_DATA = src/systemd/tmpfiles.d/cockpit-ws.conf -# ----------------- -# sysusers -sysusersconfdir = $(prefix)/lib/sysusers.d -dist_sysusersconf_DATA = src/systemd/sysusers.d/cockpit-wsinstance.conf - # ----------------- # Policykit polkitdir = $(datadir)/polkit-1/actions diff --git a/src/systemd/sysusers.d/cockpit-wsinstance.conf b/src/systemd/sysusers.d/cockpit-wsinstance.conf deleted file mode 100644 index 3f8775bbba5d..000000000000 --- a/src/systemd/sysusers.d/cockpit-wsinstance.conf +++ /dev/null @@ -1 +0,0 @@ -u cockpit-wsinstance - "User for cockpit-ws instances" - diff --git a/tools/cockpit.spec b/tools/cockpit.spec index 2aa689d14ed5..ff6c3ca6c21a 100644 --- a/tools/cockpit.spec +++ b/tools/cockpit.spec @@ -390,7 +390,6 @@ authentication via sssd/FreeIPA. %{_unitdir}/cockpit-wsinstance-socket-user.service %{_unitdir}/system-cockpithttps.slice %{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf -%{_sysusersdir}/cockpit-wsinstance.conf %{pamdir}/pam_ssh_add.so %{pamdir}/pam_cockpit_cert.so %{_libexecdir}/cockpit-ws @@ -409,11 +408,6 @@ authentication via sssd/FreeIPA. %ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name} %pre ws -# HACK: old RPM and even Fedora's current RPM don't properly support sysusers -# https://github.com/rpm-software-management/rpm/issues/3073 -getent group cockpit-wsinstance >/dev/null || groupadd -r cockpit-wsinstance -getent passwd cockpit-wsinstance >/dev/null || useradd -r -g cockpit-wsinstance -d /nonexisting -s /sbin/nologin -c "User for cockpit-ws instances" cockpit-wsinstance - if %{_sbindir}/selinuxenabled 2>/dev/null; then %selinux_relabel_pre -s %{selinuxtype} fi diff --git a/tools/debian/cockpit-ws.install b/tools/debian/cockpit-ws.install index 8fab44a15f95..5c9c16d76e80 100644 --- a/tools/debian/cockpit-ws.install +++ b/tools/debian/cockpit-ws.install @@ -18,7 +18,6 @@ ${env:deb_systemdsystemunitdir}/system-cockpithttps.slice ${env:deb_pamlibdir}/security/pam_ssh_add.so ${env:deb_pamlibdir}/security/pam_cockpit_cert.so usr/lib/tmpfiles.d/cockpit-ws.conf -usr/lib/sysusers.d/cockpit-wsinstance.conf usr/lib/cockpit/cockpit-session usr/lib/cockpit/cockpit-ws usr/lib/cockpit/cockpit-wsinstance-factory diff --git a/tools/debian/rules b/tools/debian/rules index 229845cf2d27..b7540ac5e294 100755 --- a/tools/debian/rules +++ b/tools/debian/rules @@ -87,7 +87,3 @@ else NO_QUNIT=1 pytest -vv -k 'not linter and not test_descriptions' -opythonpath=$$(ls -d debian/cockpit-bridge/usr/lib/python3*/dist-packages) endif endif - -# dh compat 14 does that automatically, remove when upgrading -execute_before_dh_installtmpfiles: - dh_installsysusers