<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-11-19 14:25 GMT+02:00 Jiri Denemark <span dir="ltr"><<a href="mailto:jdenemar@redhat.com" target="_blank">jdenemar@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Fri, Nov 13, 2015 at 10:44:01 +0200, NoxDaFox wrote:<br>
> 2015-11-13 0:30 GMT+02:00 Jiri Denemark <<a href="mailto:jdenemar@redhat.com">jdenemar@redhat.com</a>>:<br>
><br>
> > On Thu, Nov 12, 2015 at 23:47:54 +0200, noxdafox wrote:<br>
> > > Greetings,<br>
> > ><br>
> > > I was investigating on an issue in which QEMU's dynamic ownership was<br>
> > > not properly working when calling qemuDomainCoreDumpWithFormat().<br>
> ><br>
> > Could describe this issue you are investigating?<br>
> ><br>
><br>
> When calling qemuDomainCoreDumpWithFormat() the file is create as root:root<br>
> even when the dynamic ownership is specified in the qemu.conf configuration<br>
> file.<br>
<br>
</span>And what is the result? Does dumping fail because of this or does it<br>
work anyway?<br>
<br>
Jirka<br>
</blockquote></div><br><div><div><div>The file gets dumped correctly, nevertheless it's ownership is still root:root and not the one set in the configuration.<br><br></div><div>From qemu.conf<br><br># Whether libvirt should dynamically change file ownership<br># to match the configured user/group above. Defaults to 1.<br># Set to 0 to disable file ownership changes.<br>dynamic_ownership = 1<br><br></div>Now, given a user and a group, when I run qemuDomainCoreDumpWithFormat() I get the file still belonging to root:root.<br><br></div>I tested the patch locally and it was working. I could create the file anywhere and the ownership was right. <br><br></div><div>What
 I'd like to do though, is to refactor the function as its logic is a 
bit cumbersome. Before that, I'll try to provide a set of tests to help 
me during the refactoring.<br><br></div><div>It will require me a bit of
 time as I'm not accustomed to the code. I provided the patch as it is, because it was 
suggested in the other discussion.<span class="im"><br></span></div><span class="im"></span><br></div><div class="gmail_extra">Matteo.<br></div></div>