[adding gnulib]
On 8/21/19 1:34 PM, Roman Bolshakov wrote:
>>>> I get the following error when running libvirtd on
MacOS as root:
>>>>
>>>> 2019-07-11 00:12:33.673+0000: 123145573953536: error :
>>>> qemuProcessQMPLaunch:8501 : internal error: Failed to start QEMU
>>>> binary /usr/local/bin/qemu-system-x86_64 for probing: libvirt: error
>>>> : cannot set supplemental groups: Invalid argument
>>>
> +++ b/src/util/virutil.c
> @@ -1043,6 +1043,7 @@ virSetUIDGID(uid_t uid, gid_t gid, gid_t *groups
ATTRIBUTE_UNUSED,
> }
>
> # if HAVE_SETGROUPS
> + VIR_DEBUG("setgroups %d max %d", ngroups, NGROUPS_MAX);
> if (gid != (gid_t)-1 && setgroups(ngroups, groups) < 0) {
> virReportSystemError(errno, "%s",
> _("cannot set supplemental groups"));
>
>
Yes, there's an overflow:
2019-08-21 18:25:37.943+0000: 123145413914624: debug : virSetUIDGID:1046 : setgroups 23
max 16
Related samba ticket (it also has references to the python and dovecot
issues):
https://bugzilla.samba.org/show_bug.cgi?id=8773
I wonder if gnulib could provide a workaround setgroups() that overcomes
this issue (it's better to maintain such a patch there, where it
benefits multiple programs, rather than just in libvirt).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org