public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: <rs@ti.com>
To: <Ross.Burton@arm.com>, <richard.purdie@linuxfoundation.org>,
	<mathieu.dubois-briand@bootlin.com>
Cc: <openembedded-core@lists.openembedded.org>
Subject: [oe-core][PATCH] sysvinit: create tmpfile dir for x11 domain socket
Date: Tue, 7 Oct 2025 18:48:10 -0500	[thread overview]
Message-ID: <20251007234809.435300-2-rs@ti.com> (raw)

From: Randolph Sapp <rs@ti.com>

Register a volatile directory entry for the x11 domain socket when not
using systemd. This will make sure the directory is always created with
the correct permissions. Systemd already provides their own tmpfile.d
entry for the same behavior.

Currently some x11 related applications will create this directory if it
doesn't already exist, but this is not true for everything. In addition,
if the application in question isn't started as root, it's possible this
directory can be owned by a non-root user. This isn't an issue by
itself, but it can potentially lead to problems in a multi-user
environment.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta/recipes-core/sysvinit/sysvinit/02_x11  | 6 ++++++
 meta/recipes-core/sysvinit/sysvinit_3.14.bb | 2 ++
 2 files changed, 8 insertions(+)
 create mode 100644 meta/recipes-core/sysvinit/sysvinit/02_x11

diff --git a/meta/recipes-core/sysvinit/sysvinit/02_x11 b/meta/recipes-core/sysvinit/sysvinit/02_x11
new file mode 100644
index 0000000000..35c3698479
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/02_x11
@@ -0,0 +1,6 @@
+# Volatile entries to match systemd
+# https://github.com/systemd/systemd/blob/main/tmpfiles.d/x11.conf
+d root root 1777 /tmp/.X11-unix none
+d root root 1777 /tmp/.ICE-unix none
+d root root 1777 /tmp/.XIM-unix none
+d root root 1777 /tmp/.font-unix none
diff --git a/meta/recipes-core/sysvinit/sysvinit_3.14.bb b/meta/recipes-core/sysvinit/sysvinit_3.14.bb
index d4bb797624..368d77cc2e 100644
--- a/meta/recipes-core/sysvinit/sysvinit_3.14.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_3.14.bb
@@ -17,6 +17,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \
            file://rcS \
            file://bootlogd.init \
            file://01_bootlogd \
+           file://02_x11 \
            "
 SRC_URI[sha256sum] = "c90874b8c054a35991fb8c4d30c443ed1e9b1815ff6165c7b483f558be4e4b53"
 
@@ -104,6 +105,7 @@ do_install () {
 
 	install -d ${D}${sysconfdir}/default/volatiles
 	install -m 0644 ${UNPACKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
+	install -m 0644 ${UNPACKDIR}/02_x11 ${D}${sysconfdir}/default/volatiles
 
 	chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
 	chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
-- 
2.51.0



             reply	other threads:[~2025-10-07 23:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 23:48 rs [this message]
2025-10-15 14:37 ` [oe-core][PATCH] sysvinit: create tmpfile dir for x11 domain socket Ross Burton
2025-10-15 17:22   ` Randolph Sapp
     [not found]   ` <186EB9ECC2726DB8.13861@lists.openembedded.org>
2025-10-18  0:01     ` Randolph Sapp
     [not found]     ` <186F6CDD2E45611C.1873@lists.openembedded.org>
2025-10-20 21:30       ` Randolph Sapp

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=20251007234809.435300-2-rs@ti.com \
    --to=rs@ti.com \
    --cc=Ross.Burton@arm.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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