Douglas Schilling Landgraf has posted comments on this change. Change subject: security: Add encode to getfilecon and chcon ......................................................................
Patch Set 1: Tested: #1 - created a file in /tmp. touch /tmp/supertest unconfined_u:object_r:user_tmp_t:s0 /tmp/supertest #2 - Get context and set context from ovirt.node.utils import security context = security.Selinux().getcon(u'/etc/magic') print(context) security.Selinux().chcon(u'/tmp/supertest', context) #3 - See the output of ls -Z # ls -Z /tmp/supertest -rw-r--r--. root root unconfined_u:object_r:etc_t:s0 /tmp/z -- To view, visit https://gerrit.ovirt.org/45301 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic7aa07db42eebfce8242f8bb36af9e628b13d11d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: [email protected] Gerrit-HasComments: No _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
