On Fri, Dec 11, 2020 at 3:30 AM Peter Krempa <pkrempa(a)redhat.com> wrote:
There's also virJSONValueObjectAdd, that might come in handy
given my
comment below.
[...]
The best bet is to actually avoid formatting the user/group members
formatting towards qemu.
Unfortunately 0 is a very valid uid, so you'll probably need to use -1
to signal that it's the default.
We wanted to make sure we understood what you meant here. We've changed our
code to store -1 into the nfs_uid and gid whenever the default is assumed,
and only called virJSONValueObjectAdd to put the group and user integer
properties into the JSON object if the uid and gid are not -1 (i.e. not
defaults). This would leave them as "undefined" values in the JSON object.
Is this what QEMU accepts when the default is needed, or have we
misunderstood?