Add ostree-tmp-chmod.service to fix /tmp permissions on existing installs.

Resolves: #1276775
This commit is contained in:
Colin Walters 2015-11-16 10:29:11 -05:00
parent 29e76352a7
commit a152e3121f
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From e7ef7ccc9540f493fe99037f3592f8b956d5edc6 Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Fri, 13 Nov 2015 09:54:52 -0500
Subject: [PATCH] [PATCH] ostree-remount: Explicitly set /tmp to 01777
See https://bugzilla.redhat.com/show_bug.cgi?id=1276775
---
src/switchroot/ostree-remount.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/switchroot/ostree-remount.c b/src/switchroot/ostree-remount.c
index b8d3a96..9dff2a0 100644
--- a/src/switchroot/ostree-remount.c
+++ b/src/switchroot/ostree-remount.c
@@ -117,5 +117,13 @@ main(int argc, char *argv[])
maybe_mount_tmpfs_on_var ();
+ /* Ensure /sysroot/tmp is world-writable. Works around a bug
+ * where init-fs left the directory writable only to root. */
+ if (chmod ("/sysroot/tmp", 01777) == -1)
+ {
+ perror ("failed to chmod /sysroot/tmp");
+ exit (EXIT_FAILURE);
+ }
+
exit (EXIT_SUCCESS);
}
--
2.5.0

View File

@ -35,6 +35,7 @@ Requires: /usr/bin/gpgv2
Requires: systemd-units
Patch1: 0001-init-fs-Explicitly-set-tmp-to-01777.patch
Patch2: 0001-ostree-remount-Explicitly-set-tmp-to-01777.patch
%description
OSTree is a tool for managing bootable, immutable, versioned
@ -120,6 +121,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Thu Nov 12 2015 Matthew Barnes <mbarnes@redhat.com> - 2015.9-3
- Add ostree-tmp-chmod.service to fix /tmp permissions on existing installs.
Resolves: #1276775
* Fri Oct 30 2015 Colin Walters <walters@redhat.com> - 2015.9-2
- Add patch to fix permissions of /tmp
Resolves: #1276775