[node-patches] Change in ovirt-node[master]: persist: fix owner/group copy to /config

fabiand at redhat.com fabiand at redhat.com
Fri Mar 27 11:00:29 UTC 2015


Fabian Deutsch has submitted this change and it was merged.

Change subject: persist: fix owner/group copy to /config
......................................................................


persist: fix owner/group copy to /config

In commit 9a1986a8 the ovirt_store_config has been ported
to new ovirt/node package. This new persist function uses
shutil.copy2() to copy the new persisted file to /config but
on POSIX platforms[1], this means that file owner and
group are lost as well as ACLs affecting the permissions
of the persisted file during the mount bind.
This patch make sure the owner/group/selinux context are correct when
ovirt-node store a peristed file for later use with correct attributes.
[1] https://docs.python.org/2/library/shutil.html

Change-Id: I4ec3dc1773a0e84eb82c2682f9e145c15216dd91
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1204535
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M src/ovirt/node/utils/fs/__init__.py
M src/ovirt/node/utils/security.py
2 files changed, 34 insertions(+), 0 deletions(-)

Approvals:
  Douglas Schilling Landgraf: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ec3dc1773a0e84eb82c2682f9e145c15216dd91
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list