Add patch to fix permissions of /tmp

Resolves: #1276775
This commit is contained in:
Colin Walters 2015-10-30 17:14:08 -04:00
parent 4f7fb7e7e1
commit 29e76352a7
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 7bf138b0364c8922da108e81a649bef1a5ad212b Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 30 Oct 2015 17:10:23 -0400
Subject: [PATCH] init-fs: Explicitly set /tmp to 01777
I think most people were using tmpfs-on-tmp and so didn't hit this.
See https://bugzilla.redhat.com/show_bug.cgi?id=1276775
---
src/ostree/ot-admin-builtin-init-fs.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/ostree/ot-admin-builtin-init-fs.c b/src/ostree/ot-admin-builtin-init-fs.c
index 71b3b55..0172f01 100644
--- a/src/ostree/ot-admin-builtin-init-fs.c
+++ b/src/ostree/ot-admin-builtin-init-fs.c
@@ -77,6 +77,16 @@ ot_admin_builtin_init_fs (int argc, char **argv, GCancellable *cancellable, GErr
child = g_file_get_child (dir, "tmp");
if (!gs_file_ensure_directory_mode (child, 01777, cancellable, error))
goto out;
+ /* FIXME - we should be using an API that explicitly ignores umask;
+ */
+ {
+ const char *path = gs_file_get_path_cached (child);
+ if (chmod (path, 01777) == -1)
+ {
+ gs_set_prefix_error_from_errno (error, errno, "chmod");
+ goto out;
+ }
+ }
g_clear_object (&child);
if (!ostree_sysroot_ensure_initialized (target_sysroot, cancellable, error))
--
1.8.3.1

View File

@ -1,7 +1,7 @@
Summary: Tool for managing bootable, immutable filesystem trees Summary: Tool for managing bootable, immutable filesystem trees
Name: ostree Name: ostree
Version: 2015.9 Version: 2015.9
Release: 1%{?dist} Release: 2%{?dist}
#VCS: git:git://git.gnome.org/ostree #VCS: git:git://git.gnome.org/ostree
Source0: http://ftp.gnome.org/pub/GNOME/sources/ostree/%{version}/ostree-%{version}.tar.xz Source0: http://ftp.gnome.org/pub/GNOME/sources/ostree/%{version}/ostree-%{version}.tar.xz
Source1: 91-ostree.preset Source1: 91-ostree.preset
@ -34,6 +34,8 @@ Requires: dracut
Requires: /usr/bin/gpgv2 Requires: /usr/bin/gpgv2
Requires: systemd-units Requires: systemd-units
Patch1: 0001-init-fs-Explicitly-set-tmp-to-01777.patch
%description %description
OSTree is a tool for managing bootable, immutable, versioned OSTree is a tool for managing bootable, immutable, versioned
filesystem trees. While it takes over some of the roles of tradtional filesystem trees. While it takes over some of the roles of tradtional
@ -118,6 +120,10 @@ rm -rf $RPM_BUILD_ROOT
%endif %endif
%changelog %changelog
* Fri Oct 30 2015 Colin Walters <walters@redhat.com> - 2015.9-2
- Add patch to fix permissions of /tmp
Resolves: #1276775
* Wed Sep 23 2015 Colin Walters <walters@redhat.com> - 2015.9-1 * Wed Sep 23 2015 Colin Walters <walters@redhat.com> - 2015.9-1
- New upstream version - New upstream version