<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 21, 2016 at 9:03 AM, Guido Günther <span dir="ltr"><<a href="mailto:agx@sigxcpu.org" target="_blank">agx@sigxcpu.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-:28a" class="gmail-a3s gmail-aXjCH gmail-m15885e992121ac56">This should be shortened and clarified (see the other part of the<br>
thread). IMHO the root cause is that we parse the active domain XML but<br>
the live part of the seclabel is not filled in yet.</div></blockquote><div><br></div><div>Ok, reasonable to keep the actual commit slimmed down after the discussion is done.</div><div>Will be shortened on the next revision. </div><div>I also have rewritten the steps to reproduce to be more straight forward.</div><div>Let me know if you would like those also out of the commit messages scope.</div><div><br></div><div>[...] </div><div><br></div><div>> +    VIR_DOMAIN_DEF_PARSE_SKIP_<wbr>ACTIVE_LABEL        = 1 << 11,</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-:28a" class="gmail-a3s gmail-aXjCH gmail-m15885e992121ac56"><span class="gmail-">
<br>
</span>/* skip parsing of seclabel */<br>
VIR_DOMAIN_DEF_PARSE_SKIP_<wbr>SECLABEL        = 1 << 11,<br>
<br>
is IMHO shorter and I would then change the code to skip the whole<br>
seclabel parsing since it's of no need for virt-aa-helper.<br></div></blockquote><div><br></div><div>I agree that this shorter naming is better.</div><div>Will do so on the next revision I submit later today.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-:28a" class="gmail-a3s gmail-aXjCH gmail-m15885e992121ac56">
Another possibility is to not introduce a new flag but filter out<br>
seclabels in virt-aa-helper before parsing the XML without cluttering<br>
domain_conf.c even more for this special case.</div></blockquote></div><br>I liked the idea but failed to implement it this way - I guess due to my lack of experience on libxml (or virXML) functions.</div><div class="gmail_extra">A version that felt to be "almost there" based on an Xpath can be found here: <span style="color:rgb(0,0,0);font-family:monospace"><a href="http://paste.ubuntu.com/23511691/">http://paste.ubuntu.com/23511691/</a></span></div><div class="gmail_extra">Most of the complexity is the back and forth of conversion to get it back into the string and not the actual stripping.</div><div class="gmail_extra"><div>If it really is close, feedback is welcome - currently it just doesn't strip anything while the same xpath string does work as intended on xmllint.<br></div>
</div></div>