Your message dated Mon, 26 Aug 2013 23:54:32 +0200
with message-id <[email protected]>
and subject line Re: [Pkg-systemd-maintainers] Processed: reassign 720851 to 
systemd
has caused the Debian Bug report #720851,
regarding systemd - Generators uses predictable file names in /tmp
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
720851: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720851
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lvm2
Version: 2.02.98-5
Severity: normal
Tags: patch

Dear maintainer,

Debian users who use systemd sometimes have trouble booting their
machines (see e.g. http://bugs.debian.org/718190). Here at DebConf I had
the chance to reproduce the issue and noticed that the lvm2 package does
not ship the systemd generator that upstream provides.

The attached patch calls the install_systemd_generators and
install_tmpfiles_configuration make targets to install the files, adds
them to debian/lvm2.install and fixes the hard-coded path in
scripts/lvm2_activation_generator_systemd_red_hat.c (patch sent
upstream).

In my tests, this fixes the lvm boot issues with systemd. Therefore,
please merge it for your next upload.

Thank you.
diff -Nru lvm2-2.02.98/debian/lvm2.install lvm2-2.02.98/debian/lvm2.install
--- lvm2-2.02.98/debian/lvm2.install	2012-05-27 16:25:21.000000000 +0200
+++ lvm2-2.02.98/debian/lvm2.install	2013-08-14 19:02:39.000000000 +0200
@@ -8,3 +8,5 @@
 usr/share/man/man8/pv*
 usr/share/man/man8/vg*
 usr/share/man/man5
+usr/lib/tmpfiles.d/lvm2.conf
+lib/systemd/system-generators/lvm2-activation-generator
diff -Nru lvm2-2.02.98/debian/patches/lvm_path.patch lvm2-2.02.98/debian/patches/lvm_path.patch
--- lvm2-2.02.98/debian/patches/lvm_path.patch	1970-01-01 01:00:00.000000000 +0100
+++ lvm2-2.02.98/debian/patches/lvm_path.patch	2013-08-14 20:41:10.000000000 +0200
@@ -0,0 +1,28 @@
+Description: Use LVM_PATH instead of hard-coded /usr/sbin/lvm
+Author: Michael Stapelberg <[email protected]>
+Last-Update: 2013-08-14
+Forwarded: https://www.redhat.com/archives/linux-lvm/2013-August/msg00033.html
+
+---
+
+Index: lvm2-2.02.98/scripts/lvm2_activation_generator_systemd_red_hat.c
+===================================================================
+--- lvm2-2.02.98.orig/scripts/lvm2_activation_generator_systemd_red_hat.c	2013-08-14 18:44:12.005448150 +0200
++++ lvm2-2.02.98/scripts/lvm2_activation_generator_systemd_red_hat.c	2013-08-14 18:52:14.403183063 +0200
+@@ -20,6 +20,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include "lvm2app.h"
++#include "lib.h" /* for LVM_PATH */
+ 
+ #define KMSG_DEV_PATH        "/dev/kmsg"
+ #define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
+@@ -125,7 +126,7 @@
+ 	fputs("Before=local-fs.target shutdown.target\n"
+ 	      "Wants=systemd-udev-settle.service\n\n"
+ 	      "[Service]\n"
+-	      "ExecStart=/usr/sbin/lvm vgchange -aay --sysinit\n"
++	      "ExecStart=" LVM_PATH " vgchange -aay --sysinit\n"
+ 	      "Type=oneshot\n", f);
+ 
+ 	if (fclose(f) < 0) {
diff -Nru lvm2-2.02.98/debian/patches/series lvm2-2.02.98/debian/patches/series
--- lvm2-2.02.98/debian/patches/series	2013-07-13 12:32:01.000000000 +0200
+++ lvm2-2.02.98/debian/patches/series	2013-08-14 18:43:42.000000000 +0200
@@ -7,3 +7,4 @@
 dm-event-api.patch
 monitoring-default-off.patch
 missing-dmeventd.patch
+lvm_path.patch
diff -Nru lvm2-2.02.98/debian/rules lvm2-2.02.98/debian/rules
--- lvm2-2.02.98/debian/rules	2013-07-14 16:30:54.000000000 +0200
+++ lvm2-2.02.98/debian/rules	2013-08-14 19:02:46.000000000 +0200
@@ -140,6 +140,8 @@
 	dh_testroot
 	rm -rf $(INSTALL_DIR)
 	+$(MAKE_REAL) -C $(DIR) install DESTDIR=$(CURDIR)/$(INSTALL_DIR) LIB_VERSION_DM=$(DEVMAPPER_ABINAME)
+	+$(MAKE_REAL) -C $(DIR) install_systemd_generators DESTDIR=$(CURDIR)/$(INSTALL_DIR) LIB_VERSION_DM=$(DEVMAPPER_ABINAME)
+	+$(MAKE_REAL) -C $(DIR) install_tmpfiles_configuration DESTDIR=$(CURDIR)/$(INSTALL_DIR) LIB_VERSION_DM=$(DEVMAPPER_ABINAME)
 	touch $@
 
 install-base-prep:

--- End Message ---
--- Begin Message ---
Hi Bastian,

Debian Bug Tracking System <[email protected]> writes:
> Bug #720851 [lvm2] systemd - Generators uses predictable file names in /tmp
I appreciate your attention to detail, but I think there is no actual
bug worth fixing here:

Generators are invoked by systemd and argv[1] is always provided,
i.e. they will never actually write files to /tmp. And even if you call
the generator manually, nobody will ever read the file from
/tmp. Therefore, there is no attack vector here.

In case you disagree, please file a bug upstream at lvm — after all,
they ship the generator in question.

-- 
Best regards,
Michael

--- End Message ---

Reply via email to