From: Jacek Konieczny Date: Wed, 4 Nov 2015 14:44:33 +0000 (+0100) Subject: Attempt to fix journal-gatewayd X-Git-Tag: auto/th/systemd-221-8~3 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=b0c1613c74714a93805b01c0091e5710b4e455c6;p=packages%2Fsystemd.git Attempt to fix journal-gatewayd Patch found under https://github.com/systemd/systemd/issues/506 --- 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 +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; 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