]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virSecurityDACSetOwnershipInternal: Don't chown so often
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 7 Oct 2015 08:39:17 +0000 (10:39 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 16 Oct 2015 14:51:41 +0000 (16:51 +0200)
commita0f43d820d7488b8b19dd17ca1ada87e034fb3bb
tree32c6bba55009e8fdcc61c29e95a8bf7cfa988646
parentd37d8f78c07bcb72c40a568970a84da3ed92b221
virSecurityDACSetOwnershipInternal: Don't chown so often

It's better if we stat() file that we are about to chown() at
first and check if there's something we need to change. Not that
it would make much difference, but for the upcoming patches we
need to be doing stat() anyway. Moreover, if we do things this
way, we can drop @chown_errno variable which will become
redundant.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/security/security_dac.c