Change in vdsm[master]: multipath: Fix multipath.conf permissions

nsoffer at redhat.com nsoffer at redhat.com
Sat Aug 15 01:18:09 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: multipath: Fix multipath.conf permissions
......................................................................

multipath: Fix multipath.conf permissions

/etc/multipath.conf permissions are 0644 before vdsm configures it.
After configuration, the permissions become 0600. This is unintended
change caused by using temporary file, which is created using 0600.
Now we set the permissions before copying the temporary file.

Change-Id: Ib9205b59eb989325bef00d5e34247f7c74e4e587
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M lib/vdsm/tool/configurators/multipath.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/44868/1

diff --git a/lib/vdsm/tool/configurators/multipath.py b/lib/vdsm/tool/configurators/multipath.py
index 8e4d762..9f6f79f 100644
--- a/lib/vdsm/tool/configurators/multipath.py
+++ b/lib/vdsm/tool/configurators/multipath.py
@@ -134,6 +134,7 @@
     with tempfile.NamedTemporaryFile() as f:
         f.write(_CONF_DATA)
         f.flush()
+        os.chmod(f.name, 0o644)
         cmd = [constants.EXT_CP, f.name,
                _CONF_FILE]
         rc, out, err = utils.execCmd(cmd)


-- 
To view, visit https://gerrit.ovirt.org/44868
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9205b59eb989325bef00d5e34247f7c74e4e587
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list