public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/joycond/, games-util/joycond/files/
Date: Sun, 20 Mar 2022 22:55:19 +0000 (UTC)	[thread overview]
Message-ID: <1647816898.854bcc4eb92704b189020c527dd9f24f1c8f02f2.chewi@gentoo> (raw)

commit:     854bcc4eb92704b189020c527dd9f24f1c8f02f2
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 22:54:58 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 22:54:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=854bcc4e

games-util/joycond: Patch to lock down the systemd service

Thanks to Andrew Udvare.

Closes: https://bugs.gentoo.org/833792
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../joycond/files/joycond-systemd-paranoia.patch   | 45 ++++++++++++++++++++++
 ...d-systemd.patch => joycond-systemd-paths.patch} |  0
 .../joycond/joycond-0.1.0_p20210730-r1.ebuild      |  3 +-
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/games-util/joycond/files/joycond-systemd-paranoia.patch b/games-util/joycond/files/joycond-systemd-paranoia.patch
new file mode 100644
index 000000000000..f6803d074f17
--- /dev/null
+++ b/games-util/joycond/files/joycond-systemd-paranoia.patch
@@ -0,0 +1,45 @@
+From d39ce9de9420560494d92519f4e29a40d685a5b4 Mon Sep 17 00:00:00 2001
+From: Andrew Udvare <audvare@gmail.com>
+Date: Sun, 12 Dec 2021 22:02:00 -0500
+Subject: [PATCH] systemd service: paranoia mode
+
+---
+ systemd/joycond.service | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/systemd/joycond.service b/systemd/joycond.service
+index cc8e408..5a8b045 100644
+--- a/systemd/joycond.service
++++ b/systemd/joycond.service
+@@ -4,12 +4,26 @@ After=network.target
+ 
+ [Service]
+ ExecStart=/usr/bin/joycond
+-WorkingDirectory=/root
+-StandardOutput=inherit
+-StandardError=inherit
+ Restart=always
+-User=root
++
++DeviceAllow=char-input
++DevicePolicy=closed
++LockPersonality=yes
++MemoryDenyWriteExecute=yes
++NoNewPrivileges=yes
++ProtectClock=yes
++PrivateTmp=yes
++ProtectHome=yes
++ProtectHostname=yes
++ProtectControlGroups=yes
++ProtectKernelModules=yes
++ProtectProc=noaccess
++ProtectSystem=strict
++RestrictAddressFamilies=AF_NETLINK
++RestrictNetworkInterfaces=
++RestrictRealtime=yes
++RestrictSUIDSGID=yes
++SocketBindDeny=any
+ 
+ [Install]
+ WantedBy=multi-user.target
+-

diff --git a/games-util/joycond/files/joycond-systemd.patch b/games-util/joycond/files/joycond-systemd-paths.patch
similarity index 100%
rename from games-util/joycond/files/joycond-systemd.patch
rename to games-util/joycond/files/joycond-systemd-paths.patch

diff --git a/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild
index 85cfd03bba1c..89a5d6774449 100644
--- a/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild
+++ b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild
@@ -32,7 +32,8 @@ CONFIG_CHECK="
 S="${WORKDIR}/${PN}-${COMMIT}"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-systemd.patch
+	"${FILESDIR}"/${PN}-systemd-paths.patch
+	"${FILESDIR}"/${PN}-systemd-paranoia.patch
 )
 
 src_install() {


             reply	other threads:[~2022-03-20 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 22:55 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-20 22:52 [gentoo-commits] repo/gentoo:master commit in: games-util/joycond/, games-util/joycond/files/ James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1647816898.854bcc4eb92704b189020c527dd9f24f1c8f02f2.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox