snap-nova-hypervisor/patches/drop-use-of-fchownat.patch
Corey Bryant e8173abb91 Add patches to drop use of setuid and fchownat
Drop use of setuid and fchownat as they're not covered by any current
plugs and the code isn't required because in strict mode everything runs
as root.

Change-Id: Ic4f0dd6029c869595e35adc343d55e35d50e0d33
2017-06-30 18:45:04 +00:00

26 lines
981 B
Diff

Description: Drop code that uses fchownat syscall as it's not covered
by any relevant plugs. This code isn't required because in strict
mode we run everything as root:root.
Author: Corey Bryant <corey.bryant@canonical.com>
Forwarded: no
---
nova/virt/libvirt/driver.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 0e8fe070..dfcb64bc 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -2732,7 +2732,6 @@ class LibvirtDriver(driver.ComputeDriver):
i = 0 # in case there is a log rotation (like "virtlogd")
path = console_log
while bytes_to_read > 0 and os.path.exists(path):
- libvirt_utils.chown(path, os.getuid())
with libvirt_utils.file_open(path, 'rb') as fp:
read_log_data, remaining = utils.last_bytes(fp, bytes_to_read)
# We need the log file content in chronological order,
--
2.11.0