[packages/systemd] Attempt to fix journal-gatewayd
jajcus
jajcus at pld-linux.org
Wed Nov 4 15:46:23 CET 2015
commit b0c1613c74714a93805b01c0091e5710b4e455c6
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Wed Nov 4 15:44:33 2015 +0100
Attempt to fix journal-gatewayd
Patch found under https://github.com/systemd/systemd/issues/506
journal-gatewayd-fdopen.patch | 25 +++++++++++++++++++++++++
systemd.spec | 2 ++
2 files changed, 27 insertions(+)
---
diff --git a/systemd.spec b/systemd.spec
index 01881b3..6c4b24f 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -73,6 +73,7 @@ Patch10: pld-boot_efi_mount.patch
Patch11: optional-tmp-on-tmpfs.patch
Patch12: uids_gids.patch
Patch13: sysctl.patch
+Patch14: journal-gatewayd-fdopen.patch
URL: http://www.freedesktop.org/wiki/Software/systemd
BuildRequires: acl-devel
BuildRequires: attr-devel
@@ -663,6 +664,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1
cp -p %{SOURCE2} src/systemd_booted.c
%build
diff --git a/journal-gatewayd-fdopen.patch b/journal-gatewayd-fdopen.patch
new file mode 100644
index 0000000..a752f04
--- /dev/null
+++ b/journal-gatewayd-fdopen.patch
@@ -0,0 +1,25 @@
+From 9e19c04f3a4e03e37dc89b63c1ae9b0a7c611810 Mon Sep 17 00:00:00 2001
+From: Daniel Mack <daniel at zonque.org>
+Date: Tue, 7 Jul 2015 17:21:03 -0400
+Subject: [PATCH] journal-gatewayd: fix tmpfile logic
+
+"rw" is not a valid mode string for f*open(). This got broken in
+cc02a7b33049 ("journal-gatewayd: factor out opening of temp
+file").
+---
+ src/journal-remote/journal-gatewayd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
+index d9450ae..9a09f40 100644
+--- a/src/journal-remote/journal-gatewayd.c
++++ b/src/journal-remote/journal-gatewayd.c
+@@ -132,7 +132,7 @@ static int request_meta_ensure_tmp(RequestMeta *m) {
+ if (fd < 0)
+ return fd;
+
+- m->tmp = fdopen(fd, "rw");
++ m->tmp = fdopen(fd, "w+");
+ if (!m->tmp) {
+ safe_close(fd);
+ return -errno;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/b0c1613c74714a93805b01c0091e5710b4e455c6
More information about the pld-cvs-commit
mailing list