daemon: Use a private copy of /etc/lvm so we don't modify the real config.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Nov 2011 15:55:13 +0000 (15:55 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Nov 2011 16:37:12 +0000 (16:37 +0000)
commit9c299b64bb24cefafa582fe425bb65b78373d205
tree055a385bc4271edaea1a930746d1d91ceb31a3c1
parent6011b1f803ba7308c6a94b9bf6b7212cfccb9f42
daemon: Use a private copy of /etc/lvm so we don't modify the real config.

In the libguestfs live case we need to be careful not to modify the
real /etc/lvm/lvm.conf file (when setting the filter rule).

When the daemon starts, make a complete copy of /etc/lvm in a
temporary directory, and adjust LVM_SYSTEM_DIR to point to the copy.
All changes are made in the temporary copy.
daemon/daemon.h
daemon/guestfsd.c
daemon/lvm-filter.c